Skip to content

Commit 0f95aa9

Browse files
copy other folders.
1 parent af30bac commit 0f95aa9

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/devcontainers/base/src/.devcontainer/nhsnotify/postcreatecommand.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,29 @@ CURRENT_BRANCH=$(git symbolic-ref --short HEAD)
2121
echo "current branch is $CURRENT_BRANCH"
2222
git switch -C $UPDATE_BRANCH
2323

24-
\cp -r --update=none $DEST/docs ./
25-
\cp -r --update=none $DEST/infrastructure ./
24+
copy_folder_if_not_exists(){
25+
local FOLDER=$1
26+
echo "checking for folder $FOLDER"
27+
mkdir -p $DEST/$FOLDER && \
28+
\cp -r --update=none $DEST/$FOLDER ./ && \
29+
echo "Copied $FOLDER" \
30+
|| echo "Not copying $FOLDER, already exist"
31+
}
32+
copy_folder_if_not_exists ".github"
33+
copy_folder_if_not_exists "docs"
34+
copy_folder_if_not_exists "infrastructure"
35+
copy_folder_if_not_exists ".vscode"
36+
2637
\cp -rf $DEST/scripts ./
2738
\cp -f $DEST/Makefile ./
2839
\cp -f $DEST/.tool-versions ./
29-
\cp --update=none $DEST/VERSION ./
3040
\cp -f $DEST/.editorconfig ./
3141
\cp -f $DEST/.gitattributes ./
3242
\cp -f $DEST/.gitignore ./
3343
\cp -f $DEST/.gitleaksignore ./
34-
44+
\cp --update=none $DEST/VERSION ./
45+
\cp --update=none $DEST/README.md ./
46+
\cp --update=none $DEST/LICENCE.md ./
3547

3648
echo "$REPO template complete"
3749

0 commit comments

Comments
 (0)