www.nico.schottelius.org/software/cinit/browse_source/cinit-0.0.7/bin/cinit.read-conf
Nico Schottelius 423ba10303 import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-09-16 12:53:45 +02:00

13 lines
283 B
Bash

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