From: Kai Moritz Date: Fri, 14 Feb 2025 11:24:42 +0000 (+0100) Subject: `COPY` kennt jetzt auch den Suffix-Parameter X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=47947e5c88c29342d4390393fd5dab6e612f5854;p=demos%2Fkafka%2Ftraining `COPY` kennt jetzt auch den Suffix-Parameter --- diff --git a/COPY.sh b/COPY.sh index ea4dddbf..67a8fe3c 100755 --- a/COPY.sh +++ b/COPY.sh @@ -6,14 +6,26 @@ MUSTERLOESUNGEN=../spickzettel source BRANCHES.sh -git checkout grundlagen/docker +if [ "$1" != "" ]; +then + # Der erste Parameter wird als SUFFIX interpretiert + git checkout grundlagen/docker--${1} +else + git checkout grundlagen/docker +fi mkdir -p $VORLAGEN/grundlagen/docker/ 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/grundlagen/docker/ for i in $BRANCHES; do declare -n branch=${i} - git checkout $branch + if [ "$1" != "" ]; + then + # Der erste Parameter wird als SUFFIX interpretiert + git checkout $branch--${1} + else + git checkout $branch + fi if [[ $branch =~ "--vorlage" ]] then vorlage=$(echo $branch |sed -e 's/--vorlage$//')