tinker with update process
This commit is contained in:
parent
4a9e28c3ec
commit
b19268d02d
@ -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()
|
function zshlibs_boot()
|
||||||
{
|
{
|
||||||
typeset -g zshlibs_bootlevel
|
typeset -g zshlibs_bootlevel
|
||||||
|
19
tools/zshlibs_update
Normal file
19
tools/zshlibs_update
Normal 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
|
||||||
|
}
|
@ -6,12 +6,17 @@ if [[ -z ${zshlibs_install} ]]
|
|||||||
then
|
then
|
||||||
typeset -g zshlibs_install="${HOME}/.local/zshlibs"
|
typeset -g zshlibs_install="${HOME}/.local/zshlibs"
|
||||||
fi
|
fi
|
||||||
|
fpath+=(${zshlibs_install}/tools)
|
||||||
|
autoload zshlibs_update
|
||||||
if ! [[ -d ${zshlibs_install} ]]
|
if ! [[ -d ${zshlibs_install} ]]
|
||||||
then
|
then
|
||||||
zlibs_install
|
zlibs_install
|
||||||
|
else
|
||||||
|
zshlibs_update
|
||||||
fi
|
fi
|
||||||
source ${zshlibs_install}/tools.funcs.zsh
|
|
||||||
|
|
||||||
|
|
||||||
|
source ${zshlibs_install}/tools.funcs.zsh
|
||||||
source ${zshlibs_install}/zconfig.funcs.zsh
|
source ${zshlibs_install}/zconfig.funcs.zsh
|
||||||
source ${zshlibs_install}/global.funcs.zsh
|
source ${zshlibs_install}/global.funcs.zsh
|
||||||
source ${zshlibs_install}/zssh.zsh
|
source ${zshlibs_install}/zssh.zsh
|
||||||
|
Loading…
Reference in New Issue
Block a user