31 lines
811 B
Bash
31 lines
811 B
Bash
function zlibs_install()
|
|
{
|
|
git clone --branch master https://git.brass.host/tea/zshlibs.git "${HOME}/.local/zshlibs"
|
|
}
|
|
if [[ -z ${zshlibs_install} ]]
|
|
then
|
|
typeset -g zshlibs_install="${HOME}/.local/zshlibs"
|
|
fi
|
|
fpath+=(${zshlibs_install}/tools)
|
|
autoload zshlibs_update zshlibs_log
|
|
if ! [[ -d ${zshlibs_install} ]]
|
|
then
|
|
zlibs_install
|
|
else
|
|
zshlibs_log "zbootstrap" "preparing update"
|
|
if zmodload -s zsh/sched
|
|
then
|
|
zshlibs_log "zbootstrap" "updating using sched"
|
|
sched +1 zshlibs_update
|
|
zshlibs_log "zbootstrap" "scheduled: $(sched)"
|
|
else
|
|
zshlibs_log "zbootstrap" "sched not available, updating synchroniously"
|
|
zshlibs_update
|
|
fi
|
|
fi
|
|
|
|
source ${zshlibs_install}/tools.zsh
|
|
source ${zshlibs_install}/zconfig.zsh
|
|
source ${zshlibs_install}/global.zsh
|
|
source ${zshlibs_install}/zssh.zsh
|