From 5a4a82bd19a5157e6d9e05a8425f62ff2a3cf082 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 15 Mar 2025 16:59:09 +0100 Subject: [PATCH] `COPY.sh` von if/else auf case umgeschrieben --- COPY.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/COPY.sh b/COPY.sh index 67a8fe3c..1c30b43d 100755 --- a/COPY.sh +++ b/COPY.sh @@ -26,17 +26,19 @@ do else git checkout $branch fi - if [[ $branch =~ "--vorlage" ]] - then + case $branch in + *--vorlage) vorlage=$(echo $branch |sed -e 's/--vorlage$//') echo "Vorlage: $vorlage" mkdir -p $VORLAGEN/$vorlage/ rsync -av --exclude=.git --exclude=target --exclude=.idea --exclude=.gradle --exclude=build --exclude=BRANCHES.sh --exclude=BUILD.sh --exclude=COPY.sh --exclude=DIFF.sh --exclude=.gitignore --exclude=PUSH.sh --exclude=REBASE.sh --exclude=RESET.sh --exclude=TAG.sh . $VORLAGEN/$vorlage/ - else + ;; + *) echo "Lösung: $branch" mkdir -p $MUSTERLOESUNGEN/$branch/ rsync -av --exclude=.git --exclude=target --exclude=.idea --exclude=.gradle --exclude=build --exclude=BRANCHES.sh --exclude=BUILD.sh --exclude=COPY.sh --exclude=DIFF.sh --exclude=.gitignore --exclude=PUSH.sh --exclude=REBASE.sh --exclude=RESET.sh --exclude=TAG.sh . $MUSTERLOESUNGEN/$branch/ - fi + ;; + esac done git checkout scripting -- 2.20.1