Files
calendar/scripts/replace-placeholder.sh
T
Zachariah K. Sharma 29b14a90c8
Create PR containing updated CHANGELOG.md and release packages to NPM once PR is merged / Release (push) Has been cancelled
Run i18n AI automation / Run i18n (push) Has been cancelled
Next.js Bundle Analysis / analyze (push) Has been cancelled
Replace lowercase webapp URL placeholder
2026-06-08 08:47:02 -06:00

21 lines
564 B
Bash

FROM=$1
TO=$2
if [ "${FROM}" = "${TO}" ]; then
echo "Nothing to replace, the value is already set to ${TO}."
exit 0
fi
echo "Replacing all statically built instances of $FROM with $TO."
for file in $(egrep -r -l "${FROM}" apps/web/.next/ apps/web/public/); do
sed -i -e "s|$FROM|$TO|g" "$file"
done
LOWER_FROM=$(printf "%s" "$FROM" | tr "[:upper:]" "[:lower:]")
if [ "${LOWER_FROM}" != "${FROM}" ]; then
for file in $(egrep -r -l "${LOWER_FROM}" apps/web/.next/ apps/web/public/); do
sed -i -e "s|$LOWER_FROM|$TO|g" "$file"
done
fi