Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from marvin-w/feature/sync_upstream_changes
Updated synchronising scripts due to changed component structure
- Loading branch information
Showing
7 changed files
with
69 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# base path to ha upstream | ||
export HA_UPSTREAM= | ||
# base path to the xknx repo | ||
export XKNX_REPO= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
if [[ -f .config ]]; then | ||
source .config | ||
else | ||
echo "Please create the .config file containing the HA_UPSTREAM and the XKNX_REPO variables" | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -d ${XKNX_REPO}/home-assistant-plugin ]]; then | ||
echo "XKNX repo path is wrong" | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -d ${HA_UPSTREAM}/homeassistant ]]; then | ||
echo "HA upstream repo path is wrong" | ||
exit 1 | ||
fi | ||
|
||
rm -f ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py | ||
cp ${HA_UPSTREAM}/homeassistant/components/knx/* ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/ | ||
sed -i '.bak' 's/homeassistant.components.knx/custom_components.xknx/g' ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py | ||
sed -i '.bak' "s/DEPENDENCIES = \\['knx'\\]/DEPENDENCIES = \\['xknx'\\]/g" ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py | ||
sed -i '.bak' "s/DEFAULT_NAME = 'KNX/DEFAULT_NAME = 'XKNX/g" ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py | ||
sed -i '.bak' "s/_KNX_/_XKNX_/g" ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py | ||
sed -i '.bak' "s/DATA_KNX/DATA_XKNX/g" ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py | ||
sed -i '.bak' "s/DOMAIN = \"knx\"/DOMAIN = \"xknx\"/g" ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py | ||
|
||
rm -f ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/*.py.bak |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
if [[ -f .config ]]; then | ||
source .config | ||
else | ||
echo "Please create the .config file containing the HA_UPSTREAM and the XKNX_REPO variables" | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -d ${XKNX_REPO}/home-assistant-plugin ]]; then | ||
echo "XKNX repo path is wrong" | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -d ${HA_UPSTREAM}/homeassistant ]]; then | ||
echo "HA upstream repo path is wrong" | ||
exit 1 | ||
fi | ||
|
||
rm -f ${HA_UPSTREAM}/homeassistant/components/knx/* | ||
cp ${XKNX_REPO}/home-assistant-plugin/custom_components/xknx/* ${HA_UPSTREAM}/homeassistant/components/knx/ | ||
sed -i '.bak' 's/custom_components.xknx/homeassistant.components.knx/g' ${HA_UPSTREAM}/homeassistant/components/knx/*.py | ||
sed -i '.bak' "s/DEPENDENCIES = \\['xknx'\\]/DEPENDENCIES = \\['knx'\\]/g" ${HA_UPSTREAM}/homeassistant/components/knx/*.py | ||
sed -i '.bak' "s/DEFAULT_NAME = 'XKNX/DEFAULT_NAME = 'KNX/g" ${HA_UPSTREAM}/homeassistant/components/knx/*.py | ||
sed -i '.bak' "s/_XKNX_/_KNX_/g" ${HA_UPSTREAM}/homeassistant/components/knx/*.py | ||
sed -i '.bak' "s/DATA_XKNX/DATA_KNX/g" ${HA_UPSTREAM}/homeassistant/components/knx/*.py | ||
sed -i '.bak' "s/DOMAIN = \"xknx\"/DOMAIN = \"knx\"/g" ${HA_UPSTREAM}/homeassistant/components/knx/*.py | ||
|
||
rm -f ${HA_UPSTREAM}/homeassistant/components/knx/*.py.bak |