goaljobs: Remove temporary files properly.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 17 Sep 2013 17:14:03 +0000 (18:14 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 17 Sep 2013 17:14:03 +0000 (18:14 +0100)
goaljobs

index defb248..b7f929a 100755 (executable)
--- a/goaljobs
+++ b/goaljobs
@@ -140,4 +140,5 @@ echo \
 ocamlfind $best "${passthru[@]}" "${pkg[@]}" "$@" $main -o "$output"
 ocamlfind $best "${passthru[@]}" "${pkg[@]}" "$@" $main -o "$output"
 
-rm -f $main
+mainbase="$(echo $main | sed s,\.ml$,,)"
+rm -f "$mainbase"*