2020-08-13 21:04:49 (UTC-03:00)
Marcel Rodrigues <marcelgmr@gmail.com>
add option -r to run output
diff --git a/neatcc b/neatcc index 6611c5c..9adb82e 100755 --- a/neatcc +++ b/neatcc @@ -27,6 +27,7 @@ asm_sources="" c_sources="" objects="" link="yes" +run="no" waiting_arg="neither" for arg in "$@"; do @@ -56,6 +57,9 @@ for arg in "$@"; do s|g|p) nldargs="$nldargs $arg" ;; + r) + run="yes" + ;; *) printf "unknown option: %s\n" $arg >&2 exit 2 @@ -102,5 +106,9 @@ if [ $link = "yes" ]; then if [ -n "$asm_sources$c_sources" ]; then rm -f $objects fi + if [ $run = "yes" ]; then + ./a.out + rm -f ./a.out + fi fi