From 00dd9a629e2c13d07bf5a0f2c0c422e3301d1c64 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 11 Mar 2018 14:02:41 +0100 Subject: [PATCH] use current script file name instead of the wrong ShadowFox_updater_mac.sh --- ShadowFox_updater_linux.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ShadowFox_updater_linux.sh b/ShadowFox_updater_linux.sh index cfc5482..70e42b3 100644 --- a/ShadowFox_updater_linux.sh +++ b/ShadowFox_updater_linux.sh @@ -8,6 +8,7 @@ userChrome="https://raw.githubusercontent.com/overdodactyl/ShadowFox/master/user userContent="https://raw.githubusercontent.com/overdodactyl/ShadowFox/master/userContent.css" uuid_finder="https://raw.githubusercontent.com/overdodactyl/ShadowFox/master/internal_UUID_finder.sh" updater="https://raw.githubusercontent.com/overdodactyl/ShadowFox/master/ShadowFox_updater_linux.sh" +script_filename="$(basename $0)" currdir=$(pwd) @@ -22,7 +23,7 @@ cd "$(dirname "${sfp}")" ## Check if there's a newwer version of the updater script available online_version="$(curl -s ${updater} | sed -n '5p')" -current_version="$(sed '5q;d' ShadowFox_updater_mac.sh)" +current_version="$(sed '5q;d' ${script_filename})" ## Remove prefix prefix='## version: ' @@ -31,13 +32,13 @@ current_version=${current_version#$prefix} if (( $(echo "$online_version > $current_version" | bc -l) )); then echo -e "There is a new updater script available online. It will replace this one and be executed.\n" - mv ShadowFox_updater_mac.sh old_updater.sh + mv ${script_filename} old_updater.sh curl -O ${updater} && echo -e "\nThe latest updater script has been downloaded\n" # make new file executable - chmod +x ShadowFox_updater_mac.sh + chmod +x ${script_filename} # execute new updater script - ./ShadowFox_updater_mac.sh + ./${script_filename} # exit script exit 1