From f60d43484083ad3d5f28b019a38dd66d1d902ce8 Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Sun, 20 May 2018 23:05:56 +0200 Subject: [PATCH] Use wget to get the latest version of the updater --- tools/update | 6 +++++- tools/updater | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 tools/updater diff --git a/tools/update b/tools/update index 2c0ad074..f3ac8be2 100755 --- a/tools/update +++ b/tools/update @@ -1,5 +1,9 @@ #!/usr/bin/env bash +rm ./updater +wget https://raw.githubusercontent.com/TotallyNotElite/cathook/testingbranch01/tools/updater +bash updater +: ' cd cathook update() @@ -20,4 +24,4 @@ update cd build; cmake ..; make; cd ..; cd .. cp -a -u ./cathook/tools/. ./; rm ./README - +' diff --git a/tools/updater b/tools/updater new file mode 100755 index 00000000..ef9287d3 --- /dev/null +++ b/tools/updater @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +cd cathook + + +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 +} + +cd build; cmake ..; make; cd ..; cd .. + +cp -a -u ./cathook/tools/. ./; rm ./README; rm ./updater +