Install zshlib even if given as a compiled file
This commit is contained in:
committed by
T. R. Bernstein
parent
70078b465d
commit
137a1cf53a
@@ -6,11 +6,15 @@ function addLibToStartupFile() {
|
|||||||
|
|
||||||
function installZshlib() {
|
function installZshlib() {
|
||||||
local zshlibPath=${libDir}/astzweig_zshlib
|
local zshlibPath=${libDir}/astzweig_zshlib
|
||||||
pushd -q ${ASTZWEIG_ZSHLIB}
|
if [[ -d ${ASTZWEIG_ZSHLIB} ]]; then
|
||||||
zcompile -z -U ${zshlibPath} $(find . -type f -perm +u=x -maxdepth 1)
|
pushd -q ${ASTZWEIG_ZSHLIB}
|
||||||
libs+=(${zshlibPath}.zwc)
|
zcompile -z -U ${zshlibPath} $(find . -type f -perm +u=x -maxdepth 1)
|
||||||
|
libs+=(${zshlibPath}.zwc)
|
||||||
|
popd -q
|
||||||
|
elif [[ -f ${ASTZWEIG_ZSHLIB} ]]; then
|
||||||
|
cp ${ASTZWEIG_ZSHLIB} ${zshlibPath}.zwc;
|
||||||
|
fi
|
||||||
chmod ugo=r ${zshlibPath}.zwc
|
chmod ugo=r ${zshlibPath}.zwc
|
||||||
popd -q
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function modifyGlobalFpath() {
|
function modifyGlobalFpath() {
|
||||||
@@ -46,9 +50,9 @@ function getUsage() {
|
|||||||
Usage:
|
Usage:
|
||||||
$cmdName show-questions [<modkey> <modans>]...
|
$cmdName show-questions [<modkey> <modans>]...
|
||||||
$cmdName [-v] [-d FILE]
|
$cmdName [-v] [-d FILE]
|
||||||
|
|
||||||
Install convenient zsh libraries system-wide for use in zsh scripts.
|
Install convenient zsh libraries system-wide for use in zsh scripts.
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-d FILE, --logfile FILE Print log message to logfile instead of stdout.
|
-d FILE, --logfile FILE Print log message to logfile instead of stdout.
|
||||||
-v, --verbose Be more verbose.
|
-v, --verbose Be more verbose.
|
||||||
|
|||||||
Reference in New Issue
Block a user