diff --git a/tools/update b/tools/update index f3ac8be2..5aef4dce 100755 --- a/tools/update +++ b/tools/update @@ -1,27 +1,7 @@ #!/usr/bin/env bash -rm ./updater -wget https://raw.githubusercontent.com/TotallyNotElite/cathook/testingbranch01/tools/updater -bash updater - -: ' -cd cathook - -update() -{ - git fetch >update.log - if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then - $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 - exit - fi - if ! git submodule update --remote --recursive >>update.log; then - $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 - exit - fi +rm ./updater.sh +wget https://raw.githubusercontent.com/TotallyNotElite/cathook/testingbranch01/tools/updater.sh +updater() { + source updater.sh } - -update - -cd build; cmake ..; make; cd ..; cd .. - -cp -a -u ./cathook/tools/. ./; rm ./README -' +updater diff --git a/tools/updater b/tools/updater.sh similarity index 97% rename from tools/updater rename to tools/updater.sh index 17df17e6..12e592a0 100755 --- a/tools/updater +++ b/tools/updater.sh @@ -51,5 +51,3 @@ cd build; cmake ..; make; cd ..; cd .. cp -a -u ./cathook/tools/. ./; rm ./README; rm ./updater -exit -#Important! Otherwise you will run into weird bash issues after copying files