1
0
Fork 0
mirror of synced 2024-11-22 15:25: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() { _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)
} }

View file

@ -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

View file

@ -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