remaster/autogen.sh

62 lines
1010 B
Bash
Raw Normal View History

2018-04-26 11:23:51 +00:00
#!/bin/bash
# at the moment only generate dir structure in /build
2018-05-06 17:26:21 +00:00
####################
## set enviroment ##
####################
2018-04-26 18:58:19 +00:00
2018-05-06 17:26:21 +00:00
[ -n "$1" ] && mode=debug
# install | clean | debug
case
ROOTDIR=build
2018-04-26 11:23:51 +00:00
echo "clear build"
2018-05-06 17:26:21 +00:00
[ -d $ROOTDIR ] && rm -v -R $ROOTDIR
mkdir $ROOTDIR
2018-04-26 18:58:19 +00:00
######################
## skripte copieren ##
######################
2018-04-26 11:23:51 +00:00
echo "copy files"
2018-04-26 18:58:19 +00:00
2018-04-26 17:46:17 +00:00
# remaster
2018-05-06 17:26:21 +00:00
mkdir -p $ROOTDIR/usr/bin/
cp -v src/remaster.sh $ROOTDIR/usr/bin/remaster
chmod +x $ROOTDIR/usr/bin/remaster
2018-04-26 18:58:19 +00:00
2018-04-26 17:46:17 +00:00
# modules
2018-05-06 17:26:21 +00:00
mkdir -p $ROOTDIR/usr/lib/remaster/
for i in proj func mods; do
2018-05-06 17:26:21 +00:00
mkdir -p $ROOTDIR/usr/lib/remaster/$i
cp -v src/$i/* $ROOTDIR/usr/lib/remaster/$i/
2018-04-26 18:58:19 +00:00
done
# setting
2018-05-06 17:26:21 +00:00
mkdir -p $ROOTDIR/etc/remaster/
cp -v src/config.sample.cfg $ROOTDIR/etc/remaster/config.sample.cfg
2018-04-26 11:23:51 +00:00
# Pfade anpassen
#sed ...
2018-04-26 18:58:19 +00:00
2018-04-26 11:23:51 +00:00
#mkdeb...
#not jet
2018-05-06 17:26:21 +00:00
case "$1" in
install)
install || exit 1
;;
clean)
clean || exit 1
;;
debug)
debug || exit 1
;;
*)
echo "Usage: install | clean | debug"
exit 1
esac