From 80d8a9bedf2219207c6577aa398641936c85a665 Mon Sep 17 00:00:00 2001 From: 6543 Date: Mon, 7 May 2018 01:34:59 +0200 Subject: [PATCH] code format --- autogen.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/autogen.sh b/autogen.sh index 6cce94d..39f649f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,19 +1,12 @@ #!/bin/bash # at the moment only generate dir structure in /build -#################### -## set enviroment ## -#################### - -[ -n "$1" ] && mode=debug -# install | clean | debug - +#make ... function clean() { echo "clear build" [ -d build ] && rm -v -R build mkdir build } - function build() { echo "build ..." ## skripte copieren ## @@ -35,6 +28,7 @@ function build() { } +#config ... function set_rootdir() { sed -i "s//$1/g" build/usr/bin/remaster for i in proj func mods; do @@ -48,13 +42,13 @@ function set_libdir() { done } +#modes function debug() { clean build set_rootdir "`pwd`/build" set_libdir "`pwd`/build/usr/lib/remaster" } - function install() { clean build @@ -63,6 +57,7 @@ function install() { #cp -f -r build/* / } + case "$1" in install) install || exit 1 @@ -73,7 +68,10 @@ case "$1" in debug) debug || exit 1 ;; + build) + build || exit 1 + ;; *) - echo "Usage: install | clean | debug" + echo "Usage: install | clean | debug | build" exit 1 esac