From b3b1ff6d25f704b5f02e27900df2ac46bbaeed8a Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Mon, 21 May 2018 11:07:46 +0200 Subject: [PATCH] Same as last commit Bash is weird --- tools/update | 30 +++++------------------------- tools/{updater => updater.sh} | 2 -- 2 files changed, 5 insertions(+), 27 deletions(-) rename tools/{updater => updater.sh} (97%) 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