From f7595585fae0e0844877ad111388837aaf74028b Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 8 Feb 2007 23:58:09 +0000 Subject: changing template location procedures git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@163 04377dda-e619-0410-9926-eae83683ac58 --- src/templatepkg | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/templatepkg') diff --git a/src/templatepkg b/src/templatepkg index 9c1f8bc..dc0323c 100755 --- a/src/templatepkg +++ b/src/templatepkg @@ -19,6 +19,7 @@ # COMMON="/usr/libexec/simplepkg/common.sh" +BASENAME="`basename $0`" if [ -f "$COMMON" ]; then source $COMMON @@ -31,24 +32,26 @@ fi APPEND="0" if [[ ! -z "$3" && "$1" == "-a" ]]; then ROOT="$3" - TEMPLATE="$BASE_CONF/$2.template" + search_template $2 --new APPEND="1" elif [[ ! -z "$2" && "$1" == "-a" ]]; then ROOT="/" - TEMPLATE="$BASE_CONF/$2.template" + search_template $2 --new APPEND="1" elif [[ ! -z "$2" ]]; then ROOT="$2" - TEMPLATE="$BASE_CONF/$1.template" + search_template $1 --new elif [[ ! -z "$1" ]]; then - TEMPLATE="$BASE_CONF/$1.template" + search_template $1 --new ROOT="/" else - echo "usage: `basename $0` [-a]