Created
January 23, 2015 01:07
-
-
Save twalker/3dffed86258a9185b22b to your computer and use it in GitHub Desktop.
post-deploy-replace-urls.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# tbe source directory | |
# i.e. dev -- //sta-vs-wfmedia1/media/tbe/ | |
SRC_DIR="$HOME/projects/Wordfly/Website/tms/nodeapp/test/file-fixtures/tbe" | |
# tbe destination parent directory | |
# i.e. staging/prod -- NEED PATH | |
DEST_DIR="$HOME/tmp" | |
echo "Copying tbe directory into destination" | |
cp -fR $SRC_DIR $DEST_DIR | |
echo "Replacing URLs in html files" | |
for f in "$DEST_DIR/tbe/**/*.html" | |
do | |
sed -i -e 's/dev.media.wordfly.com/media.wordfly.com/g' $f | |
sed -i -e 's/dev2.tracking.wordfly.com/tracking.wordfly.com/g' $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment