From: Kai Moritz Date: Sat, 15 Mar 2025 15:59:09 +0000 (+0100) Subject: `COPY.sh` von if/else auf case umgeschrieben X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=5a4a82bd19a5157e6d9e05a8425f62ff2a3cf082;p=demos%2Fkafka%2Ftraining `COPY.sh` von if/else auf case umgeschrieben --- 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