parent
ee99fe8a36
commit
65d7f6d3d0
2 changed files with 7 additions and 5 deletions
|
@ -2,7 +2,9 @@ _zimfw_upgrade() {
|
||||||
local -r ztarget=${ZIM_HOME}/zimfw.zsh
|
local -r ztarget=${ZIM_HOME}/zimfw.zsh
|
||||||
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
|
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
|
||||||
{
|
{
|
||||||
if (( ${+commands[wget]} )); then
|
if (( ${+commands[curl]} )); then
|
||||||
|
command curl -fsSL -o ${ztarget}.new ${zurl} || return 1
|
||||||
|
else
|
||||||
local zopt
|
local zopt
|
||||||
(( _zprintlevel <= 1 )) && zopt='-q'
|
(( _zprintlevel <= 1 )) && zopt='-q'
|
||||||
if ! command wget -nv ${zopt} -O ${ztarget}.new ${zurl}; then
|
if ! command wget -nv ${zopt} -O ${ztarget}.new ${zurl}; then
|
||||||
|
@ -10,7 +12,6 @@ _zimfw_upgrade() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
command curl -fsSL -o ${ztarget}.new ${zurl} || return 1
|
|
||||||
fi
|
fi
|
||||||
_zimfw_mv ${ztarget}{.new,} && _zimfw_print -P '<%= done %>Done with upgrade.'
|
_zimfw_mv ${ztarget}{.new,} && _zimfw_print -P '<%= done %>Done with upgrade.'
|
||||||
} always {
|
} always {
|
||||||
|
|
|
@ -260,7 +260,7 @@ _zimfw_compile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print 'Zim version: 1.1.0-SNAPSHOT (previous commit is b9bca2d)'
|
print 'Zim version: 1.1.0-SNAPSHOT (previous commit is ee99fe8)'
|
||||||
print -R 'ZIM_HOME: '${ZIM_HOME}
|
print -R 'ZIM_HOME: '${ZIM_HOME}
|
||||||
print -R 'Zsh version: '${ZSH_VERSION}
|
print -R 'Zsh version: '${ZSH_VERSION}
|
||||||
print -R 'System info: '$(command uname -a)
|
print -R 'System info: '$(command uname -a)
|
||||||
|
@ -283,7 +283,9 @@ _zimfw_upgrade() {
|
||||||
local -r ztarget=${ZIM_HOME}/zimfw.zsh
|
local -r ztarget=${ZIM_HOME}/zimfw.zsh
|
||||||
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
|
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
|
||||||
{
|
{
|
||||||
if (( ${+commands[wget]} )); then
|
if (( ${+commands[curl]} )); then
|
||||||
|
command curl -fsSL -o ${ztarget}.new ${zurl} || return 1
|
||||||
|
else
|
||||||
local zopt
|
local zopt
|
||||||
(( _zprintlevel <= 1 )) && zopt='-q'
|
(( _zprintlevel <= 1 )) && zopt='-q'
|
||||||
if ! command wget -nv ${zopt} -O ${ztarget}.new ${zurl}; then
|
if ! command wget -nv ${zopt} -O ${ztarget}.new ${zurl}; then
|
||||||
|
@ -291,7 +293,6 @@ _zimfw_upgrade() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
command curl -fsSL -o ${ztarget}.new ${zurl} || return 1
|
|
||||||
fi
|
fi
|
||||||
_zimfw_mv ${ztarget}{.new,} && _zimfw_print -P 'Done with upgrade.'
|
_zimfw_mv ${ztarget}{.new,} && _zimfw_print -P 'Done with upgrade.'
|
||||||
} always {
|
} always {
|
||||||
|
|
Loading…
Reference in a new issue