import cinit from unix.schottelius.org

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-09-16 12:53:45 +02:00
commit 423ba10303
13396 changed files with 269468 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#!/bin/sh
# Nico Schottelius
# cinit: build environment to be used in scripts
# * Should be sourced by using scripts
# 2006-10-26
#
. $(dirname $0)/cinit.read-conf
export BASEDIR=${DESTDIR}${CINIT_DIR}
export SERVICES=${BASEDIR}/${SVCDIR}
export CONFIG=${BASEDIR}/${CONFDIR}

View file

@ -0,0 +1,17 @@
#!/bin/sh
# Nico Schottelius
# cinit: read configuration into variables
# Date: 2005-05-24 (Last Changed: 2005-08-08)
# try environment first
if [ "$CINIT_CONF_DIR" ]; then
CONFDIR=$CINIT_CONF_DIR
elif [ -d $(dirname $0)/../conf/ ]; then
CONFDIR=$(dirname $0)/../conf/
else
echo 'Did not find cinit configuration!' >&2
echo "Please set the variable CINIT_CONF_DIR" >&2
exit 1
fi
echo $CONFDIR

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Nico Schottelius
# cinit: install standard sub-configuration directories
# Date: 2005-08-07
#
. $(dirname $0)/cinit.build-env
for svc in $SERVICE_CATEGORIES; do
"$INSTALL_PROG" "$INSTALL_DIRECTORY" "${SERVICES}/${svc}"
done
exit 0

View file

@ -0,0 +1,32 @@
#!/bin/sh
# Nico Schottelius
# cinit: create header file
#
CONFS=$($(dirname $0)/cinit.get-confdir)/../conf/*
echo "/* Warning: Autogenerated by $0, do not edit. */"
for conf in $CONFS; do
NAME="$(basename $conf | tr a-z A-Z)"
value=$(head -n 1 $conf)
# check if numeric: no quotes needed
is_numeric=$(echo $value | awk '/^((0[xX])[0-9a-fA-F]+)|([0-9]+)$/ { print }')
is_string="$(echo $value | grep '^"')"
#
# Check for quote type
#
if [ ! "$is_numeric" -a ! "$is_string" ]; then
one_char=$(echo -n $value | wc -c)
if [ "$one_char" -eq 1 ]; then
value="'$value'"
else
# is a string
value="\"$value\""
fi
fi
echo "#define" "$NAME" "$value"
done

View file

@ -0,0 +1,18 @@
#!/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

View file

@ -0,0 +1,50 @@
#!/bin/sh
# Nico Schottelius
# Build release tar
# Date: Sat Oct 15 21:38:29 CEST 2005
# Last Changed: Fr Okt 28 01:24:58 CEST 2005
if [ $# -ne 2 ]; then
echo "This is a maintainer-only script to release cinit"
echo $(basename $0): source-dir version
exit 1
fi
cat << eof
Erinnerung:
- Version in conf/version angepasst?
Nein? Strg+C bitte...
eof
read a
DIR=$1
VERSION=$2
OUT_NAME=cinit-${VERSION}.tar.bz2
D_HOST=home.schottelius.org
D_BASE=www/org/schottelius/unix/www/cinit
D_DIR=${D_BASE}/archives/
D_SOURCE=${D_BASE}/browse_source/
LINK=current
if [ ! -d "$DIR" ]; then
echo "$DIR is not a directory"
exit 1
fi
( cd "$DIR" && make dist ) || exit 1
echo "Creating bzip2 compressed tar"
tar cj -X $DIR/.exclude -f "$OUT_NAME" "$DIR"
chmod 0644 "$OUT_NAME"
echo "Transfering to $D_HOST"
scp "$OUT_NAME" "$D_HOST:$D_DIR"
echo "Extracting to $D_SOURCE"
ssh "$D_HOST" "tar xfj $D_DIR/$OUT_NAME -C $D_SOURCE"
echo "Correcting paranoid permissions"
ssh "$D_HOST" "find \"$D_SOURCE/$DIR\" -type f -exec chmod 0644 {} \\;"
ssh "$D_HOST" "find \"$D_SOURCE/$DIR\" -type d -exec chmod 0755 {} \\;"
ssh "$D_HOST" "cd \"$D_SOURCE\" && rm -f \"$LINK\" && ln -s \"$DIR\" \"$LINK\""
echo "Please do not forget to update the website..."

View file

@ -0,0 +1,15 @@
#!/bin/sh
# Nico Schottelius
# 2006-10-23
# cLinux/cinit
. $(dirname $0)/cinit.build-env
set -e
mkdir -p "${BASEDIR}"
mkdir -p "${SERVICES}"
mkdir -p "${SERVICES}/${C_INIT}"
mkdir -p "${CONFIG}"

View file

@ -0,0 +1,18 @@
#!/bin/sh
# Nico Schottelius
# 2006-12-08
# Report compile success
#
echo "cinit compile success report"
echo "----------------------------"
"$(dirname $0)/cinit.mkheader"
echo "----------------------------"
uname -a
echo "----------------------------"
. "$(dirname $0)/cinit.read-conf"
echo '$CC'
"$CC" -v
echo "----------------------------"
echo -n "Size: "
ls -l "$(dirname $0)/../src/cinit"