From bce7118cf149e280ebf0855ce1da7e56bd0750c8 Mon Sep 17 00:00:00 2001 From: t3chn0m4g3 Date: Tue, 21 Aug 2018 20:27:53 +0000 Subject: [PATCH] ensure update functionality if update.sh was not changed. --- update.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 4a5bbcf4..18ded6f4 100755 --- a/update.sh +++ b/update.sh @@ -61,11 +61,15 @@ function fuSELFUPDATE () { myRESULT=$(git diff --name-only origin/18.04 | grep update.sh) if [ "$myRESULT" == "update.sh" ]; then - echo "###### $myBLUE""Found newer version, will update myself and restart.""$myWHITE" + echo "###### $myBLUE""Found newer version, will be pulling updates and restart myself.""$myWHITE" git reset --hard git pull --force exec "$1" "$2" exit 1 + else + echo "###### $myBLUE""Pulling updates from repository.""$myWHITE" + git reset --hard + git pull --force fi echo }