Created
October 7, 2016 14:18
-
-
Save nakal/7d3ddf547909934bbf8e9e8c10665c4d to your computer and use it in GitHub Desktop.
Command wrapper for poudriere
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
JAIL=11amd64 | |
FUN="$1" | |
DEST="$2" | |
shift 2 | |
PKG="$@" | |
OPT_EXT="" | |
if [ -z "$PKG" ]; then | |
PKG="-f ${JAIL}-local-${DEST}-pkglist" | |
else | |
OPT_EXT="-c" | |
fi | |
if [ "$FUN" = "bulk" ] || [ "$FUN" = "options" ] || [ "$FUN" = "pkgclean" ]; then | |
if [ -z "$DEST" ]; then | |
echo "Please specify a target repository." >&2 | |
exit 1 | |
fi | |
if [ "$FUN" = "options" ]; then | |
FUN="$FUN $OPT_EXT" | |
fi | |
echo poudriere $FUN -j ${JAIL} -p local -z "$DEST" $PKG | |
exec poudriere $FUN -j ${JAIL} -p local -z "$DEST" $PKG | |
fi | |
if [ "$FUN" = "ports" ]; then | |
exec poudriere "$FUN" -p local -u | |
fi | |
echo "Please specify a valid poudriere command (bulk, options, pkgclean or ports)." >&2 | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment