aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/lib/common.sh')
-rw-r--r--trunk/lib/common.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 952f25d..ac89596 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -324,6 +324,8 @@ function search_default_template {
elif [ -f "$BASE_CONF/default.template" ]; then
TEMPLATE_BASE="$BASE_CONF/default"
echo $BASENAME using default template
+ elif [ -f "$BASE_CONF/defaults/templates/default/default.template" ]; then
+ TEMPLATE_BASE="$BASE_CONF/defaults/templates/default"
else
echo $BASENAME: error: default template not found
echo $BASENAME: please create a template using templatepkg
@@ -343,6 +345,11 @@ function search_template {
# - $BASE_CONF/templates/template_name.template
# - $BASE_CONF/templates/template_name/template_name.template
#
+ # also, there's a folder for "oficial" simplepkg templates,
+ # $BASE_CONF/defaults/templates/ and you can override any template
+ # in the default folder by placing a template with the same name
+ # in the template storage folders
+ #
if [ -f "$BASE_CONF/$1.template" ]; then
TEMPLATE_BASE="$BASE_CONF/$1"
@@ -350,6 +357,8 @@ function search_template {
TEMPLATE_BASE="$BASE_CONF/templates/$1"
elif [ -f "$BASE_CONF/templates/$1/$1.template" ]; then
TEMPLATE_BASE="$BASE_CONF/templates/$1/$1"
+ elif [ -f "$BASE_CONF/defaults/templates/$1/$1.template" ]; then
+ TEMPLATE_BASE="$BASE_CONF/defaults/templates/$1/$1"
else
if [ "$2" == "--new" ]; then
# we need to return the path for a new template