live-build/functions/templates.sh

25 lines
644 B
Bash
Raw Normal View History

2007-09-23 08:05:13 +00:00
#!/bin/sh
# templates.sh - handle templates files
# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org>
2007-09-23 08:05:13 +00:00
#
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
Check_templates ()
{
2007-09-23 08:05:16 +00:00
PACKAGE="${1}"
2007-09-23 08:05:13 +00:00
2009-06-19 06:17:51 +00:00
if [ -d "config/templates/${PACKAGE}" ]
2007-09-23 08:05:13 +00:00
then
2009-06-19 06:17:51 +00:00
TEMPLATES="config/templates/${PACKAGE}"
elif [ -d "${LH_TEMPLATES}/${PACKAGE}" ]
2007-09-23 08:05:13 +00:00
then
2007-09-23 08:05:17 +00:00
TEMPLATES="${LH_TEMPLATES}/${PACKAGE}"
2007-09-23 08:05:15 +00:00
else
2009-06-19 06:17:51 +00:00
Echo_error "%s templates not accessible in %s nor config/templates" "${PACKAGE}" "${LH_TEMPLATES}"
2007-09-23 08:05:13 +00:00
exit 1
fi
}