Hash :
898395c9
Author :
Thomas de Grivel
Date :
2023-01-11T10:38:07
shpkg
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
#!/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: shpkg OPERATION PKG ...
Source directory operations :
clone shortcut for git clone
fetch shortcut for git fetch
pull shortcut for git pull
remove | rm shortcut for uninstall and rm -rf repo
Compilation operations :
autogen shortcut for ./autogen
configure shortcut for ./configure
clean shortcut for make clean
build shortcut for make
Package operations :
fake install compiled sources into fake directory
package build package from sources
install install package
upgrade pull sources, build package and install
uninstall uninstall package
" >&2
exit 1