423ba10303
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
40 lines
670 B
Desktop File
40 lines
670 B
Desktop File
#!/bin/sh
|
|
# Nico Schottelius
|
|
# cinit: create templates
|
|
# 2005-05-24
|
|
|
|
set -e
|
|
|
|
# init variables
|
|
. $(dirname $0)/cinit.read-conf
|
|
|
|
if [ $# -lt 1 ]; then
|
|
echo "`basename $0`: service-name (including category)"
|
|
echo " I do create a service for you"
|
|
exit 1
|
|
fi
|
|
|
|
BASEDIR=$DESTDIR/$CINIT_DIR
|
|
|
|
# read input (from gentoo-bug.sh, http://linux.schottelius.org/scripts/#gentoo-bug
|
|
reread()
|
|
{
|
|
_tmp=""
|
|
name="$1"
|
|
|
|
while [ ! "$_tmp" ]; do
|
|
read -p "$1 [$_tmp]: " _tmp
|
|
done
|
|
|
|
echo $_tmp
|
|
}
|
|
|
|
|
|
for svc in $@; do
|
|
echo -n "Creating $svc ..."
|
|
mkdir -p "${BASEDIR}/${svc}"
|
|
cd ${BASEDIR}/${svc}
|
|
mkdir -p "${C_WANTS}" "${C_NEEDS}"
|
|
echo "finished."
|
|
done
|
|
|