diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index b6b31c22..bf2d8f44 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -70,7 +70,13 @@ parse_arg_value() { local arg="${1}" # Parses the value after = and then escapes back/forward slashes and single quotes in it. -- cwells - eval echo "${arg}" | sed -E 's/[^=]+=?//' | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/'\''/'\''\\'\'\''/g' -e 's/&/\\&/g' -e 's/"//g' + eval echo "${arg}" | \ + sed -E 's/[^=]+=?//' | \ + sed -e 's/\\/\\\\/g' \ + -e 's/\//\\\//g' \ + -e 's/'\''/'\''\\'\'\''/g' \ + -e 's/&/\\&/g' \ + -e 's/"//g' } get_arg_value() { @@ -116,7 +122,6 @@ render() { if [ -d "${file_path}" ]; then # Recursively render every file in this directory. -- cwells echo "Rendering Directory: ${file_path}" - find "${file_path}" \( -type d -name .git -prune \) -o -type f find "${file_path}" \( -type d -name .git -prune \) -o -type f -print0 | eval "xargs -0 sed -i '' ${ARG_REPLACEMENTS}" elif [ -f "${file_path}" ]; then echo "Rendering File: ${file_path}"