From 30a8a93fe9ee70e3093e01bc78c15f006a63a067 Mon Sep 17 00:00:00 2001 From: Chris Wells Date: Wed, 25 Nov 2020 20:21:56 -0500 Subject: [PATCH] Display message about file/directory being rendered. --- usr/local/share/bastille/template.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index 8ec25ca8..8df2e738 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -97,8 +97,11 @@ get_arg_value() { render() { _file_path="${1}/${2}" 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}" eval "sed -i '' ${ARG_REPLACEMENTS} '${_file_path}'" else echo -e "${COLOR_YELLOW}Path not found for render: ${2}${COLOR_RESET}"