2007-09-23 08:05:13 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-09-02 11:12:37 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
2012-12-31 22:12:04 -01:00
|
|
|
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
|
2010-09-02 11:12:37 +00:00
|
|
|
##
|
2012-07-29 23:59:00 +00:00
|
|
|
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
2010-09-02 11:12:37 +00:00
|
|
|
## 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}"
|
2010-09-07 13:11:20 +00:00
|
|
|
elif [ -d "${LB_TEMPLATES}/${PACKAGE}" ]
|
2007-09-23 08:05:13 +00:00
|
|
|
then
|
2010-09-07 13:11:20 +00:00
|
|
|
TEMPLATES="${LB_TEMPLATES}/${PACKAGE}"
|
2007-09-23 08:05:15 +00:00
|
|
|
else
|
2010-09-07 13:11:20 +00:00
|
|
|
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
|
|
|
|
}
|