www.nico.schottelius.org/software/cinit/browse_source/cinit-0.3pre16/scripts/cinit.read-conf
Nico Schottelius 0c13ed6979 add cinit-0.3pre16
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-09-29 21:36:27 +02:00

18 lines
341 B
Bash
Executable file

#!/bin/sh
# Nico Schottelius
# cinit: read configuration into variables
# ~ 2005
#
CONFS=$($(dirname $0)/cinit.get-confdir)
set -e
for conf in ${CONFS}/*; do
NAME="$(basename $conf | tr a-z A-Z)"
if eval test -z \$$NAME; then
eval $NAME=\"$(head -n 1 $conf)\"
eval export $NAME
fi
# eval echo $NAME = \$$NAME
done