dd84c41ae5
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.
18 lines
505 B
Plaintext
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
|
|
}
|
|
}
|