Skip to content

Commit

Permalink
Add echo to cleanTestEnv and --silent option to suppress it
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyEastham committed Apr 23, 2022
1 parent aa66774 commit 2472498
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utils/cleanTestEnv
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/bash

usage="Usage: cleanTestEnv [--help] [ [--cicd] | [--local] ]"
usage="Usage: cleanTestEnv [--help] [ [--cicd] | [--local] ] [--silent]"
cicd=false
silent=false

# Based on https://stackoverflow.com/a/33826763/11827673
while [[ "$#" -gt 0 ]]; do
case $1 in
-h|--help) echo "$usage"; exit ;;
-c|--cicd) cicd=true ;;
-l|--local) cicd=false ;;
-s|--silent) silent=true ;;
*) echo "Unknown parameter passed: $1"; echo "$usage"; exit 1 ;;
esac
shift
Expand All @@ -24,4 +26,5 @@ rm -rf temp
rm install
rm install.bat
rm LICENSE.md
rm .testEnvRunning
rm .testEnvRunning
[[ $silent = false ]] && echo "Testing environment destroyed."

0 comments on commit 2472498

Please sign in to comment.