1
0
Fork 0
mirror of synced 2024-11-26 09:15:34 -05:00

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:
Eric Nielsen 2019-12-05 13:51:34 -05:00
parent 8c7d0081b1
commit c47c4fc08b
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
3 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,6 @@
_zimfw_info() {
print 'Zim version: <%= version %> (previous commit is <%= `git rev-parse --short HEAD | tr -d '\r\n'` %>)'
print -R "Zsh version: ${ZSH_VERSION}"
print -R "System info: $(command uname -a)"
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)
}

View file

@ -3,7 +3,7 @@ zimfw() {
Usage: %B${0}%b <action> [%B-q%b]
Actions:
%Bbuild%b Build init script
%Bbuild%b Build init.zsh
%Bclean%b Clean all (see below)
%Bclean-modules%b Clean unused modules
%Bclean-compiled%b Clean Zsh compiled files
@ -12,7 +12,7 @@ Actions:
%Binfo%b Print Zim and system info
%Binstall%b Install new modules
%Bupdate%b Update current modules
%Bupgrade%b Upgrade Zim
%Bupgrade%b Upgrade <%= script_filename %>
Options:
%B-q%b Quiet, only outputs errors
@ -63,7 +63,7 @@ Options:
fi && \
_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}
return 1

View file

@ -250,9 +250,10 @@ _zimfw_clean_dumpfile() {
}
_zimfw_info() {
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is e81c1d1)'
print -R "Zsh version: ${ZSH_VERSION}"
print -R "System info: $(command uname -a)"
print 'Zim version: 1.0.0-SNAPSHOT (previous commit is bccb1fc)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)
}
_zimfw_upgrade() {
@ -287,7 +288,7 @@ zimfw() {
Usage: %B${0}%b <action> [%B-q%b]
Actions:
%Bbuild%b Build init script
%Bbuild%b Build init.zsh
%Bclean%b Clean all (see below)
%Bclean-modules%b Clean unused modules
%Bclean-compiled%b Clean Zsh compiled files
@ -296,7 +297,7 @@ Actions:
%Binfo%b Print Zim and system info
%Binstall%b Install new modules
%Bupdate%b Update current modules
%Bupgrade%b Upgrade Zim
%Bupgrade%b Upgrade zimfw.zsh
Options:
%B-q%b Quiet, only outputs errors
@ -427,7 +428,7 @@ fi
fi && \
_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}
return 1