aboutsummaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-07 19:01:21 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-07 19:01:21 +0000
commit9a27f87b63c5ed0c5f0cca0a1d316daa04710cfc (patch)
tree641586643f3d7fc0f8000bfb2f660e1e495b3b77 /trunk/src
parente1b4f3e0aea6e9f1458b1477e3b42cd28f392b0d (diff)
downloadsimplepkg-9a27f87b63c5ed0c5f0cca0a1d316daa04710cfc.tar.gz
simplepkg-9a27f87b63c5ed0c5f0cca0a1d316daa04710cfc.tar.bz2
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
Diffstat (limited to 'trunk/src')
-rwxr-xr-xtrunk/src/templatepkg10
1 files 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 <doinst-path>
- 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