From 9a27f87b63c5ed0c5f0cca0a1d316daa04710cfc Mon Sep 17 00:00:00 2001 From: rhatto Date: Sat, 7 Apr 2007 19:01:21 +0000 Subject: templatepkg: small fixes on package_template and create_doinst git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@311 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/templatepkg | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index a87b361..64ca870 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -786,7 +786,7 @@ function create_doinst { # create a doinst.sh from a template.perms file # usage: create_doinst - rm $1/doinst.sh + rm -f $1/doinst.sh if [ -s "$TEMPLATE_BASE.perms" ]; then echo Setting jail $1 permissions... @@ -822,14 +822,20 @@ function package_template { 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} @@ -940,7 +946,7 @@ elif [ "$1" == "-t" ] || [ "$1" == "--template-edit" ]; then elif [ "$1" == "-p" ] || [ "$1" == "--pack" ]; then require $2 - shift + shift ; shift package_template $* elif [ "$1" == "-h" ] || [ "$1" == "--help" ]; then -- cgit v1.2.3