We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f737936 commit 8528cf9Copy full SHA for 8528cf9
sync.sh
@@ -79,12 +79,11 @@ for target in "${targets[@]}"; do
79
echo " Empty dir -> full sync"
80
rsync "${RSYNC_OPTS[@]}" "$script_dir/." "$target/"
81
82
- # Replace every occurrence of the literal word "template" in each text file
+ # Replace every occurrence of the literal word "template" in package.json and README.md
83
base="$(basename "$target")"
84
- find "$target" -type f -exec grep -Il . {} + |
85
- while IFS= read -r file; do
86
- sed -i "s/template/${base}/g" "$file"
87
- done
+ for file in "$target/package.json" "$target/README.md"; do
+ [[ -f $file ]] && sed -i "s/\btemplate\b/${base}/g" "$file"
+ done
88
89
else
90
# Selective sync: exclude key project files and directories.
0 commit comments