Installing With Make
zplugin ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX"
zplugin light tj/git-extras
Makefileof this project has only one needed target –install, which is called by default,- it also does building of the scripts that it installs, so it does 2 tasks,
- for
Makefilewith 2 targets, one could usemake"all install PREFIX=...", pick'...'willchmod +xall matching files and add$ZPFX/bin/to$PATH,$ZPFXis provided by Zplugin, it is~/.zplugin/polarisby default, can be also customized.
Below is a hard core but fully working method of managing a software (sdkman.io) with Zplugin.
# The invocation uses https://github.com/zdharma/null repo as a placeholder
# for the atclone'' and atpull'' hooks
zplugin ice as"program" pick"$ZPFX/sdkman/bin/sdk" id-as'sdkman' run-atpull \
atclone"wget https://get.sdkman.io -O scr.sh; SDKMAN_DIR=$ZPFX/sdkman bash scr.sh" \
atpull"SDKMAN_DIR=$ZPFX/sdkman sdk selfupdate" \
atinit"export SDKMAN_DIR=$ZPFX/sdkman; source $ZPFX/sdkman/bin/sdkman-init.sh"
zplugin light zdharma/null