From 285ea9c4487816abb2c0dd80396bc71bb9d9d72a Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 6 Apr 2007 17:07:54 +0000 Subject: search_default_template fix git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@293 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index e856890..778fcc6 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -321,14 +321,18 @@ function default_arch { function search_default_template { - if [ -e "$BASE_CONF/templates/default.template" ]; then - TEMPLATE_BASE="$BASE_CONF/templates/default" - echo $BASENAME: using default template - elif [ -e "$BASE_CONF/default.template" ]; then + if [ -e "$BASE_CONF/default.template" ]; then TEMPLATE_BASE="$BASE_CONF/default" echo $BASENAME using default template + elif [ -e "$BASE_CONF/templates/default.template" ]; then + TEMPLATE_BASE="$BASE_CONF/templates/default" + echo $BASENAME: using default template + elif [ -e "$BASE_CONF/templates/default/default.template" ]; then + TEMPLATE_BASE="$BASE_CONF/templates/default/default" + echo $BASENAME: using default template elif [ -e "$BASE_CONF/defaults/templates/default/default.template" ]; then TEMPLATE_BASE="$BASE_CONF/defaults/templates/default" + echo $BASENAME using default template else echo $BASENAME: error: default template not found echo $BASENAME: please create a template using templatepkg -- cgit v1.2.3