diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-11-14 14:27:57 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-11-14 14:27:57 +0100 |
| commit | 8465f4a076d3917890a699592edb94b47ba685a3 (patch) | |
| tree | 7066568412df9b4671071556a3a99252155fd1b4 /scripts/lesson-cp | |
| parent | 9352279ea918ed8a07a528f2730352fb5849c9da (diff) | |
| download | unterricht-8465f4a076d3917890a699592edb94b47ba685a3.tar.gz unterricht-8465f4a076d3917890a699592edb94b47ba685a3.zip | |
ignore '.' in lesson-cp arguments
Since cp -r is used including '.' in the arguments copies all templates.
Diffstat (limited to 'scripts/lesson-cp')
| -rwxr-xr-x | scripts/lesson-cp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lesson-cp b/scripts/lesson-cp index 20c1b68b..4221a50f 100755 --- a/scripts/lesson-cp +++ b/scripts/lesson-cp @@ -15,6 +15,11 @@ while [[ ! -d "${template_dir}" ]]; do done for template in "$@"; do + if [[ "${template}" = '.' ]]; then + echo "Skipping '.'" >&2 + continue + fi + cp -r "${template_dir}/${template}" . if [[ "$template" = "schedule.md" ]]; then |
