OSX compatibility
[m6w6/btr] / bin / btr
diff --git a/bin/btr b/bin/btr
index 2eaeac818abb1c94bf2e355947e05339f065447c..db82d6fec94f9dd444a0e8c1c295246ae7ead5bb 100755 (executable)
--- a/bin/btr
+++ b/bin/btr
@@ -1,25 +1,21 @@
 #!/bin/bash
 
-export DATE=$(date +%Y%m%d%H%M%S)
-export CPUS=${CPUS:-$(grep -c "^processor" /proc/cpuinfo)}
+export BTR_BINDIR=$(dirname $0)/
+export BTR_LIBDIR=$(dirname $0)/../share/btr
+BTR_BANNER="Build, test & report. Simple and stupid."
 
-export BINDIR=$(realpath $(dirname $0)/)
-export LIBDIR=$(realpath $(dirname $0)/../lib/btr)
+. $BTR_LIBDIR/common.sh
+. $BTR_LIBDIR/btr.sh
 
-. $LIBDIR/btr.sh
+btr_parseopts "$@"
+btr_setup
 
-VERBOSE=false
-
-parseopts $@
-setup
-
-if $VERBOSE
+if $BTR_VERBOSE
 then
-    show_conf
-    confirm "Do you want to continue?" || exit
+       btr_conf_show
+       btr_confirm "Everything setup. Do you want to continue?"
 fi
 
-REPORT="$(make -s -C $BTRDIR -f $LIBDIR/$SOURCE_RULES.mk && make -s -C $BTRDIR -f $LIBDIR/$BUILD_RULES.mk)"
-make -s -C $BTRDIR -f $LIBDIR/$REPORT_RULES.mk REPORT="$REPORT"
+btr_run
 
-# vim: set noet
+# vim: noet