about summary refs log tree commit diff stats
path: root/common/init
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-03 18:17:44 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-03 18:17:44 +0200
commit807bf019bad5c6fe7dc3e1dea953a3e69b41fbbb (patch)
tree26696b994a92cda80c63c9d4aadd4562ac6eb351 /common/init
parentfix(common/init): Add missing pipe (diff)
downloadflake-templates-807bf019bad5c6fe7dc3e1dea953a3e69b41fbbb.tar.gz
flake-templates-807bf019bad5c6fe7dc3e1dea953a3e69b41fbbb.zip
fix(common/init): Don't try to assign the reuse template, replace it instead directly
Diffstat (limited to 'common/init')
-rw-r--r--common/init8
1 files changed, 5 insertions, 3 deletions
diff --git a/common/init b/common/init
index e27c234..b1d2eb4 100644
--- a/common/init
+++ b/common/init
@@ -86,8 +86,9 @@ if curl --fail --silent --show-error "$default_license_url.txt" >/dev/null; then
     default_license_url="$default_license_url.txt"
 fi
 prompt LICENSE_URL "The url of the license" "$default_license_url"
-prompt REUSE_TEMPLATE "The template used in reuse annotate" "$(
-    cat <<EOF | fmt --uniform-spacing --width=75
+
+if [ -e ./.reuse/templates/default.jinja2 ]; then
+    cat <<EOF | fmt --uniform-spacing --width=75 >./.reuse/templates/default.jinja2
 {% for copyright_line in copyright_lines %}
 {{ copyright_line }}
 {% endfor %}
@@ -102,8 +103,9 @@ This file is part of $APPLICATION_NAME_STYLIZED - $DESCRIPTION.
 
 You should have received a copy of the License along with this program.
 If not, see <$LICENSE_URL>.
+<!-- vim: ft=htmldjango -->
 EOF
-)" "dont_ask"
+fi
 
 echo "$DESCRIPTION" >.git/description