move default opts to setup
This commit is contained in:
parent
7edefbf281
commit
b4ca4e302f
5
cscript
5
cscript
@ -16,7 +16,8 @@ fi
|
|||||||
# Get file names, options and passed-through args
|
# Get file names, options and passed-through args
|
||||||
basedir="."
|
basedir="."
|
||||||
files=""
|
files=""
|
||||||
opts=""
|
opts="-Wall
|
||||||
|
-pedantic"
|
||||||
shebang_mode=""
|
shebang_mode=""
|
||||||
at_args=""
|
at_args=""
|
||||||
args=""
|
args=""
|
||||||
@ -83,7 +84,7 @@ cleanup() {
|
|||||||
tmpfile="$(mktemp -t "cscript.XXXXXXXXXX")"
|
tmpfile="$(mktemp -t "cscript.XXXXXXXXXX")"
|
||||||
printf "%s" "$files" | xargs -d'\n' sed "s@^#!@//#!@g" -i
|
printf "%s" "$files" | xargs -d'\n' sed "s@^#!@//#!@g" -i
|
||||||
trap 'cleanup; exit 130' INT
|
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
|
cleanup
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user