txlyre 1 year ago
parent
commit
e2362132ef
1 changed files with 2 additions and 1 deletions
  1. 2 1
      langs/holyc/run.sh

+ 2 - 1
langs/holyc/run.sh

@@ -1,10 +1,11 @@
 IN="$(mktemp --suffix .HC)"
 IN="$(mktemp --suffix .HC)"
+OUT="$(mktemp)"
 
 
 cat > "$IN"
 cat > "$IN"
 
 
 LOG="$(hcc $IN)"
 LOG="$(hcc $IN)"
 
 
-if [ -f "./a.out" ] && ! [ -s "./a.out" ]; then
+if [ $? -eq 0 ]; then
   OUT="$(mktemp)"
   OUT="$(mktemp)"
   mv ./a.out "$OUT"
   mv ./a.out "$OUT"
   chmod +x "$OUT"
   chmod +x "$OUT"