diff options
author | arehbein <arehbein@sysmocom.de> | 2023-01-08 23:18:44 +0100 |
---|---|---|
committer | arehbein <arehbein@sysmocom.de> | 2023-09-26 23:27:16 +0200 |
commit | db2a4658cc9751934d1cd20023a3e77ce98b421b (patch) | |
tree | 065d3c8503388e8b23422eba2f558fb523c836b6 | |
parent | c67b85f23b1b595cb653dff0ed49d14030a00f63 (diff) |
scripts/docker-playgrond_adapt: Always prompt, even when subdir is given
Change-Id: I2f4155f5562458814ba003b9e2adcf95b1c6e459
-rwxr-xr-x | scripts/docker-playground_adapt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/docker-playground_adapt b/scripts/docker-playground_adapt index 04d68f0..42fe7c9 100755 --- a/scripts/docker-playground_adapt +++ b/scripts/docker-playground_adapt @@ -233,13 +233,12 @@ if [ -n "$TESTCASE_OPT" ]; then continue fi if [ -z "$SUBDIR" ]; then - FNAME_STR="/$TESTSUITE_CFG" + FNAME_REGEX="/$TESTSUITE_CFG" else - FNAME_STR="/$SUBDIR/$TESTSUITE_CFG" + FNAME_REGEX="/$SUBDIR/.*/\?$TESTSUITE_CFG" fi - if [ -n "$TESTCASES" ] && echo "$file" | grep -q "[^/]*$FNAME_STR"; then - if ! ( ([ -z "$SUBDIR" ] && user_wants "Adapt file $file?") || # Multiple cfg files possible, so we prompt - [ -n "$SUBDIR" ] ); then # UNVERIFIED ASSUMPTION: Only expecting one cfg file in each subdir + if [ -n "$TESTCASES" ] && echo "$file" | grep -q "[^/]*$FNAME_REGEX"; then + if ! user_wants "Adapt file $file?"; then # Multiple cfg files possible, so we prompt break; # Avoid too many nested ifs... fi TMP_FILE="/tmp/$$_file" |