code format

This commit is contained in:
6543 2018-05-07 01:34:59 +02:00
parent 1aff83904c
commit 80d8a9bedf

View File

@ -1,19 +1,12 @@
#!/bin/bash #!/bin/bash
# at the moment only generate dir structure in /build # at the moment only generate dir structure in /build


#################### #make ...
## set enviroment ##
####################

[ -n "$1" ] && mode=debug
# install | clean | debug

function clean() { function clean() {
echo "clear build" echo "clear build"
[ -d build ] && rm -v -R build [ -d build ] && rm -v -R build
mkdir build mkdir build
} }

function build() { function build() {
echo "build ..." echo "build ..."
## skripte copieren ## ## skripte copieren ##
@ -35,6 +28,7 @@ function build() {


} }


#config ...
function set_rootdir() { function set_rootdir() {
sed -i "s/<ROOTDIR>/$1/g" build/usr/bin/remaster sed -i "s/<ROOTDIR>/$1/g" build/usr/bin/remaster
for i in proj func mods; do for i in proj func mods; do
@ -48,13 +42,13 @@ function set_libdir() {
done done
} }


#modes
function debug() { function debug() {
clean clean
build build
set_rootdir "`pwd`/build" set_rootdir "`pwd`/build"
set_libdir "`pwd`/build/usr/lib/remaster" set_libdir "`pwd`/build/usr/lib/remaster"
} }

function install() { function install() {
clean clean
build build
@ -63,6 +57,7 @@ function install() {
#cp -f -r build/* / #cp -f -r build/* /
} }



case "$1" in case "$1" in
install) install)
install || exit 1 install || exit 1
@ -73,7 +68,10 @@ case "$1" in
debug) debug)
debug || exit 1 debug || exit 1
;; ;;
build)
build || exit 1
;;
*) *)
echo "Usage: install | clean | debug" echo "Usage: install | clean | debug | build"
exit 1 exit 1
esac esac