From e1609b24e639334e8fe6b541d7d4226942f2b20f Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Mon, 12 Oct 2015 17:48:34 -0400 Subject: make mcc script more robust --- minic/mcc | 6 +++--- 1 file 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 -- cgit 1.4.1