1
0
mirror of https://github.com/limosek/zaf.git synced 2024-11-25 03:49:06 +01:00

Neverending self-upgrade bug

This commit is contained in:
Lukas Macura 2016-04-04 15:10:38 +02:00
parent 1c274a512b
commit 5c3338fdb9

15
zaf
View File

@ -127,11 +127,18 @@ remove)
self-upgrade) self-upgrade)
rm -rf /tmp/zaf-installer && mkdir /tmp/zaf-installer rm -rf /tmp/zaf-installer && mkdir /tmp/zaf-installer
if zaf_fetch_url $ZAF_URL/install.sh >/tmp/zaf-installer/install.sh; then if ! which curl >/dev/null;
cd /tmp/zaf-installer && chmod +x ./install.sh && exec ./install.sh auto then
else zaf_err "Curl not found. Cannot continue. Please install it."
echo "Cannot fetch uri $ZAF_URL/install.sh!";
fi fi
[ -z "$2" ] && auto=auto
set -e
mkdir -p /tmp/zaf-installer \
&& cd /tmp/zaf-installer \
&& (for i in lib/zaf.lib.sh lib/os.lib.sh lib/ctrl.lib.sh install.sh ; do echo curl -f -k -s -L -o - "$ZAF_URL/$i" >&2; curl -f -k -s -L -o - "$ZAF_URL/$i"; done) >install.sh \
&& chmod +x install.sh \
&& exec ./install.sh $auto "$@"
exit
;; ;;
self-remove) self-remove)