From a2f70147deeccd6171c26956ee0b9aad8f58ac0b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 11 Dec 2015 11:07:47 +0000 Subject: [PATCH] Improve the update command --- src/freedombone-upgrade | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 209706e4..7cf10fe1 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -28,20 +28,24 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -FREEDOMBONE_REPO="https://github.com/bashrc/freedombone" +PROJECT_NAME='freedombone' + +FREEDOMBONE_REPO="https://github.com/bashrc/${PROJECT_NAME}" update-ca-certificates -if [ ! -d /root/freedombone ]; then - echo " git clone $FREEDOMBONE_REPO /root/freedombone" +if [ ! -d /root/${PROJECT_NAME} ]; then + git clone $FREEDOMBONE_REPO /root/${PROJECT_NAME} fi -if [ -f /root/freedombone.cfg ]; then - cd /root/freedombone - git stash - git pull - make install - freedombone -c /root/freedombone.cfg +if [ -d /root/${PROJECT_NAME} ]; then + if [ -f /root/${PROJECT_NAME}.cfg ]; then + cd /root/${PROJECT_NAME} + git stash + git pull + make install + ${PROJECT_NAME} -c /root/${PROJECT_NAME}.cfg + fi fi echo '