tremove target on failure (sun) - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 724b43e60e9cda4648934865aecaadfa455a3e76
 (DIR) parent 39dbe6e72b5e0ffc7989da7f1e59f41498d2b492
 (HTM) Author: rsc <devnull@localhost>
       Date:   Fri,  7 Jan 2005 18:51:26 +0000
       
       remove target on failure (sun)
       
       Diffstat:
         M bin/9l                              |      13 ++++++++++++-
       
       1 file changed, 12 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/bin/9l b/bin/9l
       t@@ -15,6 +15,12 @@ then
                verbose=true
        fi
        
       +target=a.out
       +if [ "x$1" = "x-o" ]
       +then
       +        target=$2
       +fi
       +
        if $doautolib
        then
                ofiles=""
       t@@ -188,4 +194,9 @@ if $verbose
        then
                echo $ld -L$PLAN9/lib "$@" $libsl $extralibs
        fi
       -exec $ld -L$PLAN9/lib "$@" $libsl $extralibs
       +if ! $ld -L$PLAN9/lib "$@" $libsl $extralibs
       +do
       +        rm -f $target
       +        exit 1
       +done
       +exit 0