summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-12 17:48:34 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-12 17:48:34 -0400
commite1609b24e639334e8fe6b541d7d4226942f2b20f (patch)
tree211a106a8d0b259118ded9d6695c6d08458403df
parentccd6bd869c4b793815155432af9d48e1a051679c (diff)
downloadroux-e1609b24e639334e8fe6b541d7d4226942f2b20f.tar.gz
make mcc script more robust
-rwxr-xr-xminic/mcc6
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