diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-12 17:48:34 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-12 17:48:34 -0400 |
commit | e1609b24e639334e8fe6b541d7d4226942f2b20f (patch) | |
tree | 211a106a8d0b259118ded9d6695c6d08458403df | |
parent | ccd6bd869c4b793815155432af9d48e1a051679c (diff) | |
download | roux-e1609b24e639334e8fe6b541d7d4226942f2b20f.tar.gz |
make mcc script more robust
-rwxr-xr-x | minic/mcc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/minic/mcc b/minic/mcc index 523c7f5..76e0603 100755 --- a/minic/mcc +++ b/minic/mcc @@ -1,5 +1,6 @@ #!/bin/sh +TMP=/tmp/minic.s SRC=$1 if [ -z "$SRC" ]; then @@ -7,6 +8,5 @@ if [ -z "$SRC" ]; then exit 1 fi -rm -f /tmp/minic.s -./minic < $SRC | ../lisc/lisc - > /tmp/minic.s -[ -f /tmp/minic.s ] && cc /tmp/minic.s +./minic < $SRC | ../lisc/lisc - > $TMP +[ -s $TMP ] && cc $TMP |