From 8dcc0e595a54303363e4ff6d0535c1bd7a36e239 Mon Sep 17 00:00:00 2001 From: Lukas Macura Date: Fri, 8 Apr 2016 23:26:46 +0200 Subject: [PATCH] Repaired self-upgrade --- lib/zaf.lib.sh | 1 + zaf | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/zaf.lib.sh b/lib/zaf.lib.sh index 9e1fbfe..b0c90f3 100644 --- a/lib/zaf.lib.sh +++ b/lib/zaf.lib.sh @@ -2,6 +2,7 @@ # Hardcoded variables ZAF_VERSION="1.0" ZAF_URL="https://github.com/limosek/zaf" +ZAF_RAW_URL="https://raw.githubusercontent.com/limosek/zaf" ############################################ Common routines diff --git a/zaf b/zaf index 0870985..adcb259 100755 --- a/zaf +++ b/zaf @@ -153,8 +153,8 @@ install) ;; reinstall) - shift $(zaf_shift "$@") shift + shift $(zaf_shift "$@") [ -z "$1" ] && echo "$0 reinstall plugin [plugin]..." for p in $@; do if zaf_is_plugin "$p"; then @@ -180,15 +180,16 @@ remove) ;; self-upgrade) + shift shift $(zaf_shift "$@") + [ -z "$1" ] && auto=auto zaf_os_specific zaf_check_deps zaf && zaf_err "Zaf is installed as system package. Cannot self-upgrade." rm -rf /tmp/zaf-installer && mkdir /tmp/zaf-installer if ! which curl >/dev/null; then zaf_err "Curl not found. Cannot continue. Please install it." fi - [ -z "$1" ] && auto=auto - zaf_fetch_url $ZAF_URL/$ZAF_VERSION/install.sh | exec sh -s "$@" + zaf_fetch_url $ZAF_RAW_URL/$ZAF_VERSION/install.sh | exec sh -s $auto "$@" exit ;;