Skip to content

Instantly share code, notes, and snippets.

@floehopper
Created July 10, 2017 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floehopper/52ba1d5315452a1b8740853de6de9278 to your computer and use it in GitHub Desktop.
Save floehopper/52ba1d5315452a1b8740853de6de9278 to your computer and use it in GitHub Desktop.
Fixes for govuk-puppet/development-vm/replication/sync-mysql.sh on OSX
brew install gnu-sed --with-default-names
diff --git a/development-vm/replication/sync-mysql.sh b/development-vm/replication/sync-mysql.sh
index 5f9589b..581eaac 100755
--- a/development-vm/replication/sync-mysql.sh
+++ b/development-vm/replication/sync-mysql.sh
@@ -82,7 +82,7 @@ for file in $(find $MYSQL_DIR -name 'daily*production*.sql.bz2'); do
fi
done
- TEMP_SED_SCRIPT=$(mktemp)
+ TEMP_SED_SCRIPT=$(mktemp -t foo)
if $RENAME_DATABASES; then
awk '{print "/^CREATE DATABASE/,+10",$0}' $(dirname $0)/mappings/names.sed > ${TEMP_SED_SCRIPT}
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment