# create a doinst.sh from a template.perms file
# usage: create_doinst <doinst-path>
- rm $1/doinst.sh
+ rm -f $1/doinst.sh
if [ -s "$TEMPLATE_BASE.perms" ]; then
echo Setting jail $1 permissions...
if [ -z "$1" ]; then
version="1"
+ else
+ version="$1"
fi
if [ -z "$2" ]; then
build="1"
+ else
+ build="$2"
fi
if [ -z "$3" ]; then
arch="noarch"
+ else
+ arch="$3"
fi
TMP=${TMP:=/tmp}
elif [ "$1" == "-p" ] || [ "$1" == "--pack" ]; then
require $2
- shift
+ shift ; shift
package_template $*
elif [ "$1" == "-h" ] || [ "$1" == "--help" ]; then