live-build/functions/templates.sh

26 lines
656 B
Bash
Raw Normal View History

2007-09-23 08:05:13 +00:00
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program 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.
2007-09-23 08:05:13 +00:00
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 "${LB_TEMPLATES}/${PACKAGE}" ]
2007-09-23 08:05:13 +00:00
then
TEMPLATES="${LB_TEMPLATES}/${PACKAGE}"
2007-09-23 08:05:15 +00:00
else
Echo_error "%s templates not accessible in %s nor config/templates" "${PACKAGE}" "${LB_TEMPLATES}"
2007-09-23 08:05:13 +00:00
exit 1
fi
}