50 lines
1.0 KiB
Plaintext
50 lines
1.0 KiB
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
INPUT=~/build/HEADER.html.in
|
||
|
CPP="cpp -traditional -undef -P -C -nostdinc"
|
||
|
|
||
|
if [ "$1"x = ""x ] ; then
|
||
|
echo "$0: Need to be told which directory to target!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
cd $1
|
||
|
for DIR in *; do
|
||
|
if [ -d $DIR ] && [ $DIR != trace ] ; then
|
||
|
ARCH=$DIR
|
||
|
case $ARCH in
|
||
|
i386|amd64|arm64)
|
||
|
EXTRAS="-DISOHYBRID"
|
||
|
;;
|
||
|
multi-arch)
|
||
|
EXTRAS="-DISOHYBRID -DONEonly"
|
||
|
ARCH="multi"
|
||
|
;;
|
||
|
*)
|
||
|
EXTRAS=""
|
||
|
;;
|
||
|
esac
|
||
|
case $ARCH in
|
||
|
kfreebsd*)
|
||
|
KERNEL="kFreeBSD"
|
||
|
;;
|
||
|
hurd*)
|
||
|
KERNEL="Hurd"
|
||
|
;;
|
||
|
*)
|
||
|
KERNEL="Linux"
|
||
|
;;
|
||
|
esac
|
||
|
for DIR1 in $DIR/*-* ; do
|
||
|
STYLE=$(echo $DIR1 | sed 's,^.*/,,g;s,-.*$,,g')
|
||
|
TYPE=$(echo $DIR1 | sed 's,^.*-,,g')
|
||
|
ls -l $DIR1 | grep -q update
|
||
|
if [ $? -eq 0 ] ; then
|
||
|
UPDATES="-DUPDATES"
|
||
|
fi
|
||
|
#echo "Found directory $DIR (ARCH $ARCH, STYLE $STYLE, TYPE $TYPE)"
|
||
|
$CPP -DARCH=${ARCH} -DARCH${ARCH} -DKERNEL=${KERNEL} -DSTYLE${STYLE} -DSTYLE=${STYLE} -DTYPE${TYPE} $UPDATES $EXTRAS $INPUT > $DIR1/HEADER.html
|
||
|
done
|
||
|
fi
|
||
|
done
|