remove the build.log too at exit, and also use the proper $pwd prefix
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Feb 2004 12:10:07 +0000 (12:10 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 19 Feb 2004 12:10:07 +0000 (12:10 +0000)
to find the files/dirs to remove so that it still works if we "die" after
having done a 'cd'

testcurl.sh

index f4f4dfb..4cbe95d 100755 (executable)
@@ -38,9 +38,13 @@ export LANG
 
 die(){
     echo "testcurl: ENDING HERE"
-    if test -n "$build"; then
+    if test -n "$pwd/$build"; then
       # we have a build directory name, remove the dir
-      rm -rf $build
+      rm -rf "$pwd/$build"
+    fi
+    if test -r "$pwd/build.log"; then
+      # we have a build log output file left, remove it
+      rm -rf "$pwd/build.log"
     fi
     exit 1
 }