Compile also after upgrade, add ZIM_HOME to info
We want to recompile zimfw.zsh if it changes. ZIM_HOME is not required to be set beforehand anymore, so let's give the users the variable info back.
This commit is contained in:
parent
8c7d0081b1
commit
c47c4fc08b
3 changed files with 13 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print 'Zim version: <%= version %> (previous commit is <%= `git rev-parse --short HEAD | tr -d '\r\n'` %>)'
|
print 'Zim version: <%= version %> (previous commit is <%= `git rev-parse --short HEAD | tr -d '\r\n'` %>)'
|
||||||
print -R "Zsh version: ${ZSH_VERSION}"
|
print -R 'ZIM_HOME: '${ZIM_HOME}
|
||||||
print -R "System info: $(command uname -a)"
|
print -R 'Zsh version: '${ZSH_VERSION}
|
||||||
|
print -R 'System info: '$(command uname -a)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ zimfw() {
|
||||||
Usage: %B${0}%b <action> [%B-q%b]
|
Usage: %B${0}%b <action> [%B-q%b]
|
||||||
|
|
||||||
Actions:
|
Actions:
|
||||||
%Bbuild%b Build init script
|
%Bbuild%b Build init.zsh
|
||||||
%Bclean%b Clean all (see below)
|
%Bclean%b Clean all (see below)
|
||||||
%Bclean-modules%b Clean unused modules
|
%Bclean-modules%b Clean unused modules
|
||||||
%Bclean-compiled%b Clean Zsh compiled files
|
%Bclean-compiled%b Clean Zsh compiled files
|
||||||
|
@ -12,7 +12,7 @@ Actions:
|
||||||
%Binfo%b Print Zim and system info
|
%Binfo%b Print Zim and system info
|
||||||
%Binstall%b Install new modules
|
%Binstall%b Install new modules
|
||||||
%Bupdate%b Update current modules
|
%Bupdate%b Update current modules
|
||||||
%Bupgrade%b Upgrade Zim
|
%Bupgrade%b Upgrade <%= script_filename %>
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
%B-q%b Quiet, only outputs errors
|
%B-q%b Quiet, only outputs errors
|
||||||
|
@ -63,7 +63,7 @@ Options:
|
||||||
fi && \
|
fi && \
|
||||||
_zimfw_source_zimrc && _zimfw_build && _zimfw_compile ${2}
|
_zimfw_source_zimrc && _zimfw_build && _zimfw_compile ${2}
|
||||||
;;
|
;;
|
||||||
upgrade) _zimfw_upgrade ;;
|
upgrade) _zimfw_upgrade && _zimfw_compile ;;
|
||||||
*)
|
*)
|
||||||
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
||||||
return 1
|
return 1
|
||||||
|
|
13
zimfw.zsh
13
zimfw.zsh
|
@ -250,9 +250,10 @@ _zimfw_clean_dumpfile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is e81c1d1)'
|
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is bccb1fc)'
|
||||||
print -R "Zsh version: ${ZSH_VERSION}"
|
print -R 'ZIM_HOME: '${ZIM_HOME}
|
||||||
print -R "System info: $(command uname -a)"
|
print -R 'Zsh version: '${ZSH_VERSION}
|
||||||
|
print -R 'System info: '$(command uname -a)
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_upgrade() {
|
_zimfw_upgrade() {
|
||||||
|
@ -287,7 +288,7 @@ zimfw() {
|
||||||
Usage: %B${0}%b <action> [%B-q%b]
|
Usage: %B${0}%b <action> [%B-q%b]
|
||||||
|
|
||||||
Actions:
|
Actions:
|
||||||
%Bbuild%b Build init script
|
%Bbuild%b Build init.zsh
|
||||||
%Bclean%b Clean all (see below)
|
%Bclean%b Clean all (see below)
|
||||||
%Bclean-modules%b Clean unused modules
|
%Bclean-modules%b Clean unused modules
|
||||||
%Bclean-compiled%b Clean Zsh compiled files
|
%Bclean-compiled%b Clean Zsh compiled files
|
||||||
|
@ -296,7 +297,7 @@ Actions:
|
||||||
%Binfo%b Print Zim and system info
|
%Binfo%b Print Zim and system info
|
||||||
%Binstall%b Install new modules
|
%Binstall%b Install new modules
|
||||||
%Bupdate%b Update current modules
|
%Bupdate%b Update current modules
|
||||||
%Bupgrade%b Upgrade Zim
|
%Bupgrade%b Upgrade zimfw.zsh
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
%B-q%b Quiet, only outputs errors
|
%B-q%b Quiet, only outputs errors
|
||||||
|
@ -427,7 +428,7 @@ fi
|
||||||
fi && \
|
fi && \
|
||||||
_zimfw_source_zimrc && _zimfw_build && _zimfw_compile ${2}
|
_zimfw_source_zimrc && _zimfw_build && _zimfw_compile ${2}
|
||||||
;;
|
;;
|
||||||
upgrade) _zimfw_upgrade ;;
|
upgrade) _zimfw_upgrade && _zimfw_compile ;;
|
||||||
*)
|
*)
|
||||||
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in a new issue