diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-02-12 17:08:52 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-02-12 17:08:52 +0000 |
commit | 3d7f72ccfa6641335ffec2bc6f19cd79cade30fd (patch) | |
tree | 928eefd2beb642c2dab4be51a269f0f470de5294 /trunk/lib | |
parent | 50570901c1743d507dd4ca347b161786cab608f0 (diff) | |
download | simplepkg-3d7f72ccfa6641335ffec2bc6f19cd79cade30fd.tar.gz simplepkg-3d7f72ccfa6641335ffec2bc6f19cd79cade30fd.tar.bz2 |
improving svn support in templatepkg
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@187 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r-- | trunk/lib/common.sh | 9 |
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 |