Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Command wrapper for poudriere
#!/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