-
-
Save leogopal/70314566a62e98aba437730cab77e0ca to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
cd _seed | |
FILENAME=$(find . -maxdepth 1 -name [a-zA-Z0-9]*-migrate-[0-9]*.sql.gz) | |
gunzip ${FILENAME} -c > temp.sql | |
read -p "New Domain Name e.g. http://example.com: " replacement | |
cat temp.sql | sed -e "s@##DEV_URL##@${replacement}@g" > temp2.sql | |
cat temp2.sql | sed -e "s@##DEV_PATH##@${replacement}@g" > new_db.sql | |
rm -rf temp.sql | |
rm -rf temp2.sql | |
#mysql -u root -proot apolitical < new_db.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment