Skip to content

Commit

Permalink
changed updatedom script (to pull/compile from github)
Browse files Browse the repository at this point in the history
added updatebeta/updaterelease to quickly download/install new binary version
  • Loading branch information
gizmocuz committed Aug 16, 2015
1 parent d3d7554 commit f379ca1
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 35 deletions.
2 changes: 1 addition & 1 deletion makebeta
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ then
rm ${archive_file}.sha256sum
fi

tar -zcf ${archive_file} domoticz History.txt License.txt domoticz.sh server_cert.pem --exclude .svn www/ scripts/ Config/
tar -zcf ${archive_file} domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease --exclude .svn www/ scripts/ Config/
if [ $? -ne 0 ]
then
echo "Error creating archive!...";
Expand Down
2 changes: 1 addition & 1 deletion makerelease
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ then
rm ${archive_file}.sha256sum
fi

tar -zcf ${archive_file} domoticz History.txt License.txt domoticz.sh server_cert.pem --exclude .svn www/ scripts/ Config/
tar -zcf ${archive_file} domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease --exclude .svn www/ scripts/ Config/
if [ $? -ne 0 ]
then
echo "Error creating archive!...";
Expand Down
12 changes: 12 additions & 0 deletions updatebeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# This script can be used to upgrade to the latest beta version
# Please not that this is for ARMv6 ARMv7 systems only ! (for example a raspberry pi/cubie)

echo "Updating to latest beta version..."
echo "Please Standby..."
wget http://domoticz.sourceforge.net/beta/domoticz_linux_armv7l.tgz
tar xvfz domoticz_linux_armv7l.tgz
rm domoticz_linux_armv7l.tgz
echo "Restarting Domoticz... (please standby...)"
sudo service domoticz.sh restart
51 changes: 18 additions & 33 deletions updatedomo
Original file line number Diff line number Diff line change
@@ -1,39 +1,24 @@
#!/bin/sh

SVN_SERVER="svn://svn.code.sf.net/p/domoticz/code/trunk"
# This script can be used to upgrade/compile to the latest version
# Please not that all modifications on the original files are lost

echo "Checking the server revision..."
SERVER_REVISION=`svn log -l1 $SVN_SERVER | sed -n 2p | sed 's/.\([0-9][0-9][0-9][0-9]\).*/\1/'`
echo "Server revision at $SERVER_REVISION"
echo "Checking the working copy revision..."
LOCAL_REVISION=`svn log -l1 | sed -n 2p | sed 's/.\([0-9][0-9][0-9][0-9]\).*/\1/'`
echo "Working copy revision at $LOCAL_REVISION"
echo "Updating to server revision..."
git fetch --all
git reset --hard origin/master

if [ "$SERVER_REVISION" -eq "$LOCAL_REVISION" ]
cmake -DCMAKE_BUILD_TYPE=Release .
if [ $? -ne 0 ]
then
echo "Domoticz is up to date. Nothing to do."
exit 1
else
svn update
if [ $? -ne 0 ]
then
echo "svnupdate failed!";
exit 1
fi
cmake -DCMAKE_BUILD_TYPE=Release .
if [ $? -ne 0 ]
then
echo "CMake failed!";
exit 1
fi
make
if [ $? -ne 0 ]
then
echo "Compile failed!";
exit 1
fi
# stop domoticz
echo "Restarting Domoticz... (please standby...)"
sudo service domoticz.sh stop
sudo service domoticz.sh start
echo "CMake failed!";
exit 1
fi
make
if [ $? -ne 0 ]
then
echo "Compile failed!";
exit 1
fi
# Restart domoticz
echo "Restarting Domoticz... (please standby...)"
sudo service domoticz.sh restart
13 changes: 13 additions & 0 deletions updaterelease
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# This script can be used to upgrade to the latest release version
# Please not that this is for ARMv6 ARMv7 systems only ! (for example a raspberry pi/cubie)
# It is NOT recommended to run this script if you are on a beta version

echo "Updating to latest beta version..."
echo "Please Standby..."
wget http://domoticz.sourceforge.net/domoticz_linux_armv7l.tgz
tar xvfz domoticz_linux_armv7l.tgz
rm domoticz_linux_armv7l.tgz
echo "Restarting Domoticz... (please standby...)"
sudo service domoticz.sh restart

0 comments on commit f379ca1

Please sign in to comment.