osmith has uploaded this change for review.

View Change

ttcn3.sh: add clean argument

Change-Id: If779b87c02d01b877e44118db34bdf2c83dbf619
---
M ttcn3/ttcn3.sh
1 file changed, 27 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/00/34700/1
diff --git a/ttcn3/ttcn3.sh b/ttcn3/ttcn3.sh
index 3563062..68dec64 100755
--- a/ttcn3/ttcn3.sh
+++ b/ttcn3/ttcn3.sh
@@ -14,12 +14,29 @@
DOCKER_IMG_BUILD="debian-bookworm-build"
DOCKER_IMG_TITAN="debian-bookworm-titan"

+clean() {
+ if [ "$1" != "clean" ]; then
+ return
+ fi
+ if [ "$#" != 1 ]; then
+ parse_args -h
+ fi
+
+ set -x
+ rm -rf \
+ "$DIR_MAKE" \
+ "$DIR_OUTPUT" \
+ "$DIR_USR_LOCAL"
+ exit 0
+}
+
parse_args() {
while getopts 'h' OPTION; do
case "$OPTION" in
h|*)
local name="$(basename $0)"
echo "usage: $name [-h] PROJECT"
+ echo " or: $name clean"
echo "arguments:"
echo " -h show help"
echo " PROJECT the testsuite project to run"
@@ -380,6 +397,7 @@
echo "---"
}

+clean "$@"
parse_args "$@"
check_usage
check_ttcn3_install

To view, visit change 34700. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: If779b87c02d01b877e44118db34bdf2c83dbf619
Gerrit-Change-Number: 34700
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange