Created
August 2, 2016 13:34
-
-
Save matti/3d0567b8c48949681bdbfb97275dc296 to your computer and use it in GitHub Desktop.
pg_dump that eats -i for rails 3.2
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
#!/usr/bin/env bash | |
# use with ln -s pg_dump /usr/local/bin/pg_dump (or something that is before actual pg_dump in path) | |
actual_pg_dump=$(/usr/bin/pg_dump) | |
better="" | |
while true; do | |
case "$1" in | |
-i) | |
;; | |
"") | |
break | |
;; | |
*) | |
better="$better $1" | |
;; | |
esac | |
shift | |
done | |
$actual_pg_dump $better |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment