]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/commitdiff
Remove uses of declare
authorb3nj4m1n <b3nj4m1n@gmx.net>
Sat, 14 May 2022 10:41:55 +0000 (12:41 +0200)
committerb3nj4m1n <b3nj4m1n@gmx.net>
Sat, 14 May 2022 10:41:55 +0000 (12:41 +0200)
xdg-ninja.sh

index b65844d55ae210c5a51de38e67f23ed293b752e6..f173a57e02b6c95ab3466cd027e0521bdb657734 100755 (executable)
@@ -74,9 +74,9 @@ printf "\n"
 # Function to expand environment variables in string
 # https://stackoverflow.com/a/20316582/11110290
 apply_shell_expansion() {
-    declare data="$1"
-    declare delimiter="__apply_shell_expansion_delimiter__"
-    declare command="cat <<$delimiter"$'\n'"$data"$'\n'"$delimiter"
+    data="$1"
+    delimiter="__apply_shell_expansion_delimiter__"
+    command="cat <<$delimiter"$'\n'"$data"$'\n'"$delimiter"
     eval "$command"
 }