From 1afb3ba4d207f3db3c0fac30aa8e14ed97c1625e Mon Sep 17 00:00:00 2001 From: Eli <12579154+erijohnt@users.noreply.github.com> Date: Sat, 27 May 2023 23:34:54 -0500 Subject: [PATCH] chore: speedup replace-env-vars.sh (#1146) --- replace-env-vars.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/replace-env-vars.sh b/replace-env-vars.sh index fe7acc698..6518fcc9e 100644 --- a/replace-env-vars.sh +++ b/replace-env-vars.sh @@ -11,7 +11,4 @@ fi # Only peform action if $FROM and $TO are different. echo "Replacing all statically built instances of $FROM with this string $TO ." -find apps/app/.next -type f | -while read file; do - sed -i "s|$FROM|$TO|g" "$file" -done \ No newline at end of file +grep -R -la "${FROM}" apps/app/.next | xargs -I{} sed -i "s|$FROM|$TO|g" "{}"