summaryrefslogtreecommitdiff
path: root/functions/templates.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/templates.sh')
-rwxr-xr-xfunctions/templates.sh17
1 files changed, 4 insertions, 13 deletions
diff --git a/functions/templates.sh b/functions/templates.sh
index 846034b..eec52f3 100755
--- a/functions/templates.sh
+++ b/functions/templates.sh
@@ -11,23 +11,14 @@ Check_templates ()
{
PACKAGE="${1}"
- # Check user defined templates directory
- if [ ! -e "${LH_TEMPLATES}" ]
+ if [ -d "config/templates/${PACKAGE}" ]
then
- if [ -d config/templates ]
- then
- LH_TEMPLATES=config/templates
- else
- Echo_error "templates not accessible in %s nor config/templates" "${LH_TEMPLATES}"
- exit 1
- fi
- fi
-
- if [ -d "${LH_TEMPLATES}/${PACKAGE}" ]
+ TEMPLATES="config/templates/${PACKAGE}"
+ elif [ -d "${LH_TEMPLATES}/${PACKAGE}" ]
then
TEMPLATES="${LH_TEMPLATES}/${PACKAGE}"
else
- Echo_error "%s templates not accessible in %s" "${PACKAGE}" "${LH_TEMPLATES}"
+ Echo_error "%s templates not accessible in %s nor config/templates" "${PACKAGE}" "${LH_TEMPLATES}"
exit 1
fi
}