mirror of
https://github.com/limosek/zaf.git
synced 2024-11-24 03:19:05 +01:00
Repaired self-upgrade
This commit is contained in:
parent
8edce1bc43
commit
8dcc0e595a
@ -2,6 +2,7 @@
|
|||||||
# Hardcoded variables
|
# Hardcoded variables
|
||||||
ZAF_VERSION="1.0"
|
ZAF_VERSION="1.0"
|
||||||
ZAF_URL="https://github.com/limosek/zaf"
|
ZAF_URL="https://github.com/limosek/zaf"
|
||||||
|
ZAF_RAW_URL="https://raw.githubusercontent.com/limosek/zaf"
|
||||||
|
|
||||||
############################################ Common routines
|
############################################ Common routines
|
||||||
|
|
||||||
|
7
zaf
7
zaf
@ -153,8 +153,8 @@ install)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
reinstall)
|
reinstall)
|
||||||
shift $(zaf_shift "$@")
|
|
||||||
shift
|
shift
|
||||||
|
shift $(zaf_shift "$@")
|
||||||
[ -z "$1" ] && echo "$0 reinstall plugin [plugin]..."
|
[ -z "$1" ] && echo "$0 reinstall plugin [plugin]..."
|
||||||
for p in $@; do
|
for p in $@; do
|
||||||
if zaf_is_plugin "$p"; then
|
if zaf_is_plugin "$p"; then
|
||||||
@ -180,15 +180,16 @@ remove)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
self-upgrade)
|
self-upgrade)
|
||||||
|
shift
|
||||||
shift $(zaf_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."
|
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
|
rm -rf /tmp/zaf-installer && mkdir /tmp/zaf-installer
|
||||||
if ! which curl >/dev/null;
|
if ! which curl >/dev/null;
|
||||||
then
|
then
|
||||||
zaf_err "Curl not found. Cannot continue. Please install it."
|
zaf_err "Curl not found. Cannot continue. Please install it."
|
||||||
fi
|
fi
|
||||||
[ -z "$1" ] && auto=auto
|
zaf_fetch_url $ZAF_RAW_URL/$ZAF_VERSION/install.sh | exec sh -s $auto "$@"
|
||||||
zaf_fetch_url $ZAF_URL/$ZAF_VERSION/install.sh | exec sh -s "$@"
|
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user