jplew / SyncDB

Bash script meant to take the tedium out of deploying and updating database-driven (eg Wordpress) websites. It rapidly synchronizes local and remote versions of a MySQL database, performs the necessary search and replace queries, then synchronizes all your uploads/binaries.
MIT License
234 stars 41 forks source link

Update Search-Replace-DB scripts #4

Closed markchitty closed 10 years ago

markchitty commented 10 years ago

The paths to the Search-Replace-DB scripts have changed, along with one of the command line flags. I have replaced them as follows:

Script paths on github - line 171:

# Search-Replace-DB
searchScriptName=srdb.class.php
cliScriptName=srdb.cli.php
srdbPath=https://raw.github.com/interconnectit/Search-Replace-DB/master/
searchScriptPath=$srdbPath$searchScriptName
cliScriptPath=$srdbPath$cliScriptName

Command line flag for database name was -d, is now -n - line 782:

echo "./$cliScriptName -h "$l_db_host" -u $l_db_user -n $l_db_name -p $l_db_pass -c utf\-8 -s "$r_web_addr" -r "${l_web_addr:-$l_web_dir}" "

./$cliScriptName -h "$l_db_host" -u $l_db_user -n $l_db_name -p $l_db_pass -c utf\-8 -s "$r_web_addr" -r "${l_web_addr:-$l_web_dir}" 

and line 836:

echo "./$cliScriptName -h $r_db_host -u $r_db_user -n $r_db_name -p $r_db_pass -c utf\-8 -s $l_web_addr -r $r_web_addr"

./$cliScriptName -h "$r_db_host" -u "$r_db_user" -n "$r_db_name" -p "$r_db_pass" -c utf\-8 -s "$l_web_addr" -r "$r_web_addr"

I probably should fork your script and put this in a pull-request but I'm new to github and up against a project deadline at the moment so I hope you'll excuse the issue posting!

jplew commented 10 years ago

Dear Mark: thanks for doing this, you saved me a ton of time. No worries about the pull-request, since you were so kind as to supply the line numbers I incorporated all your changes as is. They're working great for me, if you want to test on your end that'd be great.