small fix

This commit is contained in:
TotallyNotElite 2019-01-17 20:09:06 +01:00
parent e844401cff
commit 482459bf33
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ echo $$ > ${LOCKFILE}
echo -e "\033[1;34m \n \nAuto Updater: Updating cathook in the background\n\033[0m"
if [ "$(git rev-parse --is-shallow-repository)" == "true" ]; then
sudo -u $LOGNAME bash -c 'git fetch --force --depth 1 origin refs/tags/latest:refs/tags/latest origin && git reset --hard latest && git submodule update --depth 1 --init --recursive || { echo -e "\033[1;33m\nFailed to pull from github! Trying alternative pull (legacy)\n\033[0m"; git fetch --depth 1 && git reset --hard @{upstream} && git submodule update --depth 1 --init --recursive; }' || { echo -e "\033[1;31m\nFailed to pull from github! A reinstall is recommended. https://github.com/nullworks/cathook\n\033[0m"; exit 1; }
sudo -u $LOGNAME bash -c 'git fetch --force --depth 1 origin refs/tags/latest:refs/tags/latest && git reset --hard latest && git submodule update --depth 1 --init --recursive || { echo -e "\033[1;33m\nFailed to pull from github! Trying alternative pull (legacy)\n\033[0m"; git fetch --depth 1 && git reset --hard @{upstream} && git submodule update --depth 1 --init --recursive; }' || { echo -e "\033[1;31m\nFailed to pull from github! A reinstall is recommended. https://github.com/nullworks/cathook\n\033[0m"; exit 1; }
else
sudo -u $LOGNAME bash -c 'echo -e "\033[1;33m\nWarning! Running in developer mode! Expect issues!\n\033[0m" && git pull origin >/dev/null && git submodule update --init --recursive >/dev/null' || { echo -e "\033[1;31m \n \nAuto Updater: Failed to pull from github!\n\033[0m"; exit 1; }
fi

2
update
View File

@ -5,7 +5,7 @@ if [ $EUID == 0 ]; then
fi
#Get updated source code
if [ "$(git rev-parse --is-shallow-repository)" == "true" ]; then
git fetch --force --depth 1 origin refs/tags/latest:refs/tags/latest origin && git reset --hard latest && git submodule update --depth 1 --init --recursive || { echo -e "\033[1;33m\nFailed to pull from github! Trying alternative pull (legacy)\n\033[0m"; git fetch --depth 1 && git reset --hard @{upstream} && git submodule update --depth 1 --init --recursive || { echo -e "\033[1;31m\nFailed to pull from github! A reinstall is recommended. https://github.com/nullworks/cathook\n\033[0m"; exit 1; } }
git fetch --force --depth 1 origin refs/tags/latest:refs/tags/latest && git reset --hard latest && git submodule update --depth 1 --init --recursive || { echo -e "\033[1;33m\nFailed to pull from github! Trying alternative pull (legacy)\n\033[0m"; git fetch --depth 1 && git reset --hard @{upstream} && git submodule update --depth 1 --init --recursive || { echo -e "\033[1;31m\nFailed to pull from github! A reinstall is recommended. https://github.com/nullworks/cathook\n\033[0m"; exit 1; } }
else
echo -e "\033[1;33m\nWarning! Running in developer mode! Expect issues!\n\033[0m" && git pull origin && git submodule update --init --recursive || { echo -e "\033[1;31m\n\nFailed to pull from github!\n\033[0m"; exit 1; }
fi