Instantly share code, notes, and snippets.

Embed
What would you like to do?
pre-commit
#!/usr/bin/env bash
current_date=`date +%Y_%m_%d_%H_%M`;
cd /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump
mkdir -p "$current_date";
mysqldump --net_buffer_length="83000" -u wp_user -pwp_password -h 0.0.0.0 -P 32770 --skip-extended-insert wordpress > /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump/"$current_date"/"$current_date".sql
cd /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump/"$current_date";
echo "adding new sql file to repo"
cd /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/
git add /Users/richardzilahi/zilahir/tuts/wp/1/wordpress/!sqldump/"$current_date"/"$current_date".sql
@icetee

This comment has been minimized.

Copy link

icetee commented Jan 4, 2019

Maybe change: /Users/richardzilahi/ to ~/ ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment