diff --git a/tools.funcs.zsh b/tools.funcs.zsh index 92a825d..a0999e9 100644 --- a/tools.funcs.zsh +++ b/tools.funcs.zsh @@ -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 diff --git a/tools/zshlibs_update b/tools/zshlibs_update new file mode 100644 index 0000000..a66c3aa --- /dev/null +++ b/tools/zshlibs_update @@ -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 +} diff --git a/zbootstrap.zsh b/zbootstrap.zsh index a2f56be..fa4253d 100644 --- a/zbootstrap.zsh +++ b/zbootstrap.zsh @@ -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