Hash :
4c48bec9
Author :
Thomas de Grivel
Date :
2023-01-11T10:05:17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
#!/bin/sh
# Copyright 2023 Thomas de Grivel
set -e
# Config
SHPKG_DIR=${SHPKG_DIR:-~/shpkg}
# SHPKG
. ${SHPKG_DIR}/lib/shpkg.subr
# CLI
if [ "x$1" = "xclone" ]; then
shift
verbose shpkg_clone "$@"
exit
elif [ "x$1" = "xconfigure" ]; then
shift
verbose shpkg_configure "$@"
exit
elif [ "x$1" = "xfetch" ] ||
[ "x$1" = "xf" ]; then
shift
verbose shpkg_fetch "$@"
exit
elif [ "x$1" = "xinstall" ] ||
[ "x$1" = "xi" ]; then
shift
verbose shpkg_install "$@"
exit
elif [ "x$1" = "xpull" ] ||
[ "x$1" = "xp" ]; then
shift
verbose shpkg_pull "$@"
exit
elif [ "x$1" = "xremove" ] ||
[ "x$1" = "xrm" ]; then
shift
verbose shpkg_uninstall "$@"
verbose shpkg_remove "$@"
exit
elif [ "x$1" = "xupdate" ]; then
verbose shpkg_update
exit
elif [ "x$1" = "xupgrade" ]; then
shift
verbose shpkg_upgrade "$@"
exit
fi
echo "Usage: $0 (clone|fetch|pull|remove) PKG ..." >&2
exit 1