]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- run_vm cleanup better and removes trailing slash on single argument.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 6 Jul 2020 09:33:07 +0000 (11:33 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 6 Jul 2020 09:33:07 +0000 (11:33 +0200)
doc/Changelog
testcode/run_vm.sh

index f5aca5af640e989751742c4d64aebfc2da66da4e..58f0493bdf3b154daebe56ea9b9acd112c1cdf24 100644 (file)
@@ -1,3 +1,6 @@
+6 July 2020: Wouter
+       - run_vm cleanup better and removes trailing slash on single argument.
+
 29 June 2020: Wouter
        - Move reply list clean for serve expired mesh callback to after
          the reply is sent, so that script callbacks have reply_info.
index d14c63742717d2c89cd9560e33b4a797a52cbc57..5f599e144a5be4ee12be7c45e7d19034a1104a3f 100644 (file)
@@ -26,12 +26,17 @@ cd testdata
 TPKG=../testcode/mini_tdir.sh
 #RUNLIST=`(ls -1d *.tdir|grep -v '^0[016]')`
 RUNLIST=`(ls -1d *.tdir)`
-if test "$#" = "1"; then RUNLIST="$1"; fi
+if test "$#" = "1"; then
+       RUNLIST="$1";
+       if echo "$RUNLIST" | grep '/$' >/dev/null; then
+               RUNLIST=`echo "$RUNLIST" | sed -e 's?/$??'`
+       fi
+fi
 
 # fix up tdir that was edited on keyboard interrupt.
 cleanup() {
        echo cleanup
-       if test -f "$t.bak"; then mv "$t.bak" "$t"; fi
+       if test -f "$t.bak"; then rm -fr "${t}"; mv "$t.bak" "$t"; fi
        exit 0
 }
 trap cleanup INT