From 4862b99b7e5ae406d7d6130d91adfecaecbe9331 Mon Sep 17 00:00:00 2001 From: prplwtf Date: Wed, 25 Oct 2023 19:38:09 +0200 Subject: [PATCH] fix(core): Attempt at fixing placeholder problems regarding spaces inside of file names. --- blueprint.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index 1401e15..1203da9 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -445,24 +445,24 @@ if [[ ( $2 == "-i" ) || ( $2 == "-install" ) ]]; then VCMD="y" fi for f in $(find $DIR -type f -exec echo {} \;); do - sed -i "s~\^#version#\^~$version~g" $f - sed -i "s~\^#author#\^~$author~g" $f - sed -i "s~\^#name#\^~$name~g" $f - sed -i "s~\^#identifier#\^~$identifier~g" $f - sed -i "s~\^#path#\^~$FOLDER~g" $f - sed -i "s~\^#datapath#\^~$FOLDER/.blueprint/data/extensions/$identifier~g" $f - sed -i "s~\^#installmode#\^~$INSTALLMODE~g" $f - sed -i "s~\^#blueprintversion#\^~$VERSION~g" $f + sed -i "s~\^#version#\^~$version~g" "$f" + sed -i "s~\^#author#\^~$author~g" "$f" + sed -i "s~\^#name#\^~$name~g" "$f" + sed -i "s~\^#identifier#\^~$identifier~g" "$f" + sed -i "s~\^#path#\^~$FOLDER~g" "$f" + sed -i "s~\^#datapath#\^~$FOLDER/.blueprint/data/extensions/$identifier~g" "$f" + sed -i "s~\^#installmode#\^~$INSTALLMODE~g" "$f" + sed -i "s~\^#blueprintversion#\^~$VERSION~g" "$f" if [[ $SKIPAZPLACEHOLDERS != true ]]; then - sed -i "s~__version__~$version~g" $f - sed -i "s~__author__~$author~g" $f - sed -i "s~__identifier__~$identifier~g" $f - sed -i "s~__name__~$name~g" $f - sed -i "s~__path__~$FOLDER~g" $f - sed -i "s~__datapath__~$FOLDER/.blueprint/data/extensions/$identifier~g" $f - sed -i "s~__installmode__~$INSTALLMODE~g" $f - sed -i "s~__blueprintversion__~$VERSION~g" $f + sed -i "s~__version__~$version~g" "$f" + sed -i "s~__author__~$author~g" "$f" + sed -i "s~__identifier__~$identifier~g" "$f" + sed -i "s~__name__~$name~g" "$f" + sed -i "s~__path__~$FOLDER~g" "$f" + sed -i "s~__datapath__~$FOLDER/.blueprint/data/extensions/$identifier~g" "$f" + sed -i "s~__installmode__~$INSTALLMODE~g" "$f" + sed -i "s~__blueprintversion__~$VERSION~g" "$f" fi log_bright "[INFO] Done placeholders in '$f'."