From 47947e5c88c29342d4390393fd5dab6e612f5854 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 14 Feb 2025 12:24:42 +0100 Subject: [PATCH] `COPY` kennt jetzt auch den Suffix-Parameter --- COPY.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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$//') -- 2.20.1