diff --git a/cbuild.sh b/cbuild.sh index 0580f3d..43d86ee 100755 --- a/cbuild.sh +++ b/cbuild.sh @@ -49,13 +49,13 @@ Usage: ./cbuild.sh [COMMAND] COMMAND: - build generate the makefile, compile objects and link target. - clean remove makefile, objects, and target. - buildcn clean, and then build. - generate ONLY generate the makefile. - run build, then execute TARGET. - dryrun print all commands that will be executed during the build process - to stdout. + build generate the makefile, compile objects and link target. + clean remove makefile, objects, and target. + buildcn clean, and then build. + generate ONLY generate the makefile. + run [ARGS] build, then execute TARGET with arguments ARGS. + dryrun print all commands that will be executed during the build process + to stdout. EOF } @@ -138,7 +138,7 @@ clean() { run() { build || exit $? info "Running ./${TARGET}" - "./${TARGET}" || + "./${TARGET}" $@ || err "Run FAILURE ./${TARGET} returned $?" } @@ -169,7 +169,7 @@ case $1 in clean) clean;; buildcn) clean ; build;; generate) gen_makefile && info "Done";; - run) run;; + run) shift 1 && run $@;; dryrun) dry_run;; __progress__) __progress__ "${2}" "${3}";; *) usage;;