From b4ca4e302fb21dd59d87d01233a3ad0b219e259c Mon Sep 17 00:00:00 2001 From: r4 Date: Sat, 10 Sep 2022 19:19:48 +0200 Subject: [PATCH] move default opts to setup --- cscript | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cscript b/cscript index 4b5e109..a128a51 100755 --- a/cscript +++ b/cscript @@ -16,7 +16,8 @@ fi # Get file names, options and passed-through args basedir="." files="" -opts="" +opts="-Wall +-pedantic" shebang_mode="" at_args="" args="" @@ -83,7 +84,7 @@ cleanup() { tmpfile="$(mktemp -t "cscript.XXXXXXXXXX")" printf "%s" "$files" | xargs -d'\n' sed "s@^#!@//#!@g" -i trap 'cleanup; exit 130' INT -if ! printf "%s\n%s" "$files" "$opts" | xargs -d'\n' cc -Wall -pedantic -o "$tmpfile"; then +if ! printf "%s\n%s" "$files" "$opts" | xargs -d'\n' cc -o "$tmpfile"; then cleanup exit 1 fi