mirror of
https://github.com/zplug/zplug
synced 2025-09-01 10:40:45 +02:00
31 lines
765 B
Bash
31 lines
765 B
Bash
#!/bin/zsh
|
|
|
|
__import "core/core"
|
|
__import "print/print"
|
|
|
|
local main
|
|
main="b4b4r07/zplug"
|
|
|
|
__zplug::print::print::put "$fg_bold[default] * zplug self management$reset_color\n"
|
|
|
|
if __check__ "$main"; then
|
|
__update__ "$main"
|
|
else
|
|
if ! __zplug::core::core::zpluged "$main"; then
|
|
__add__ "$main"
|
|
fi
|
|
__install__ "$main"
|
|
fi
|
|
|
|
ln -snf \
|
|
"$ZPLUG_HOME/repos/$main/init.zsh" \
|
|
"$ZPLUG_HOME/init.zsh"
|
|
|
|
if (( $status == 0)) && [[ -d $ZPLUG_HOME/repos/$main ]]; then
|
|
__zplug::print::print::put "$fg[green]Everything is ready. "
|
|
__zplug::print::print::put "$fg_bold[default]($ZPLUG_HOME/zplug)$reset_color\n"
|
|
else
|
|
__zplug::print::print::die "$fg[red]Error occured (see ${(%):-"%U"}$_ZPLUG_URL${(%):-"%u"})$reset_color\n"
|
|
return 1
|
|
fi
|