tinker with update process

This commit is contained in:
Aleksey 2024-01-18 19:05:39 +04:00
parent 4a9e28c3ec
commit b19268d02d
Signed by: tea
GPG Key ID: D9C68D34A3CAE37A
3 changed files with 25 additions and 21 deletions

View File

@ -1,24 +1,4 @@
function zshlibs_update()
{
zshlibs_log zlibs_update "preparing self update …"
if [[ -n "$zshlibs_install" ]]
then
zshlibs_log zlibs_update "cd into '$zshlibs_install' …"
pushd $zshlibs_install 2>&1 > /dev/null
zshlibs_log zlibs_update "git pull …"
(
git pull 2>&1 |zshlibs_log zlibs_update &
)
zshlibs_log zlibs_update "update done"
popd 2>&1 > /dev/null
else
echo "\$zshlibs_install not set!"
return 1
zlibs_install
fi
}
function zshlibs_boot()
{
typeset -g zshlibs_bootlevel

19
tools/zshlibs_update Normal file
View File

@ -0,0 +1,19 @@
function zshlibs_update()
{
zshlibs_log zlibs_update "preparing self update …"
if [[ -n "$zshlibs_install" ]]
then
zshlibs_log zlibs_update "cd into '$zshlibs_install' …"
pushd $zshlibs_install 2>&1 > /dev/null
zshlibs_log zlibs_update "git pull …"
(
git pull 2>&1 |zshlibs_log zlibs_update &
)
zshlibs_log zlibs_update "update done"
popd 2>&1 > /dev/null
else
echo "\$zshlibs_install not set!"
return 1
zlibs_install
fi
}

View File

@ -6,12 +6,17 @@ if [[ -z ${zshlibs_install} ]]
then
typeset -g zshlibs_install="${HOME}/.local/zshlibs"
fi
fpath+=(${zshlibs_install}/tools)
autoload zshlibs_update
if ! [[ -d ${zshlibs_install} ]]
then
zlibs_install
else
zshlibs_update
fi
source ${zshlibs_install}/tools.funcs.zsh
source ${zshlibs_install}/tools.funcs.zsh
source ${zshlibs_install}/zconfig.funcs.zsh
source ${zshlibs_install}/global.funcs.zsh
source ${zshlibs_install}/zssh.zsh