1
0
Fork 0
mirror of synced 2024-06-01 14:51:11 -04:00
zimfw/src/stage2/50_zimfw_upgrade.zsh.erb
Eric Nielsen dd84c41ae5
v1.0.0
Changes:
*  Reduce the Zim "core" to a single file
*  Simplify installation with an installation script (Closes #182)
*  Put the configuration into .zshrc instead of a separate .zimrc
   (Closes #288)
*  Do not support themes that require promptinit (See #325)
*  Generate a static script that does autoload the functions and source
   the modules

This version is not backwards-compatible with previous versions, so a
new installation of Zim is required.
2020-01-02 13:13:12 -05:00

18 lines
505 B
Plaintext

_zimfw_upgrade() {
local -r ztarget=${ZIM_HOME}/zimfw.zsh
local -r zurl=https://raw.githubusercontent.com/zimfw/zimfw/master/zimfw.zsh
{
if (( ${+commands[wget]} )); then
command wget -nv -O ${ztarget}.new ${zurl} || return 1
else
command curl -fsSL -o ${ztarget}.new ${zurl} || return 1
fi
_zimfw_mv ${ztarget}{.new,} && \
if (( ! _zquiet )); then
print -P '<%= done %>Done with upgrade.'
fi
} always {
command rm -f ${ztarget}.new
}
}