Add a flag to remove the temporal directory. (#349)

* Add a flag to remove the temporal directory.

* Add else statement

* Apply comment
diff --git a/tools/rcverify.sh b/tools/rcverify.sh
index d392a87..5ec52a2 100755
--- a/tools/rcverify.sh
+++ b/tools/rcverify.sh
@@ -38,6 +38,9 @@
 # the release candidate, usualy 'rc1'
 RC=${4:-rc1}
 
+# the last argument is optional and if set to 'cleanup', the script deletes the scratch space at completion
+REMOVE_DIR=${5:-cleanup}
+
 # set to non-zero to download the artifacts to verify, this is the default
 DL=${DL:-1}
 
@@ -212,7 +215,15 @@
 printf "scanning package-lock.json for version match..."
 packageJsonCheckVersion "$DIR/$BASE/package-lock.json" $V
 
-echo $(tput setaf 6)
-echo run the following command to remove the scratch space:
-echo "  rm -rf '$DIR'"
-echo $(tput sgr0)
+if [ "$REMOVE_DIR" = "cleanup" ]; then
+  echo "the flag to remove the working directory is enabled"
+  printf "removing the scratch space($(tput setaf 6)$DIR$(tput sgr0))..."
+  rm -rf $DIR
+  printf " $(tput setaf 2)done\n$(tput sgr0)"
+else
+  echo "the flag to remove the working directory is disabled"
+  echo $(tput setaf 6)
+  echo run the following command to remove the scratch space:
+  echo "  rm -rf '$DIR'"
+  echo $(tput sgr0)
+fi