live-build/functions/conffile.sh

22 lines
271 B
Bash
Raw Normal View History

2007-09-23 08:04:46 +00:00
#!/bin/sh
# conffile.sh - handle configuration files
set -e
Read_conffile ()
{
CONFFILE="${1}"
# Reading configuration file
2007-09-23 08:04:47 +00:00
if [ -f "${CONFFILE}" ]
2007-09-23 08:04:46 +00:00
then
2007-09-23 08:04:47 +00:00
if [ -r "${CONFFILE}" ]
then
. "${CONFFILE}"
else
echo "W: failed to read ${CONFFILE}"
fi
2007-09-23 08:04:46 +00:00
fi
}