about summary refs log tree commit diff stats
path: root/common
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-04-02 14:44:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-04-02 14:44:22 +0200
commit80076665c1bc3f8bf28f36ba779f4dfb8a341a78 (patch)
tree55f91154e7a3c32a660c7a7934c1c669e2b8669a /common
parentfix(common/files/docs/): Also correct a typo in the manual template (diff)
downloadflake-templates-80076665c1bc3f8bf28f36ba779f4dfb8a341a78.tar.gz
flake-templates-80076665c1bc3f8bf28f36ba779f4dfb8a341a78.zip
fix(common/files/init): Replace the variables globally
Diffstat (limited to '')
-rwxr-xr-xcommon/files/init4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/files/init b/common/files/init
index df0b4c5..e7414d6 100755
--- a/common/files/init
+++ b/common/files/init
@@ -78,11 +78,11 @@ while read -r var; do
     var_value="${var#*=\"}"
     var_value="${var_value%\"}"
 
-    fd . --hidden --type file --exec sed --in-place "s|%\bINIT_$var_name\b|$var_value|"
+    fd . --hidden --type file --exec sed --in-place "s|%\bINIT_$var_name\b|$var_value|g"
 
     # Replace the variable in file paths
     fd "%INIT_$var_name" . --hidden | while read -r file_path; do
-        new_file_path="$(echo "$file_path" | sed "s|%INIT_$var_name|$var_value|")";
+        new_file_path="$(echo "$file_path" | sed "s|%INIT_$var_name|$var_value|g")";
         mv "$file_path" "$new_file_path"
     done
 done < "$replacement_file"