Skip to content

Instantly share code, notes, and snippets.

@matti
Created August 2, 2016 13:34
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 matti/3d0567b8c48949681bdbfb97275dc296 to your computer and use it in GitHub Desktop.
Save matti/3d0567b8c48949681bdbfb97275dc296 to your computer and use it in GitHub Desktop.
pg_dump that eats -i for rails 3.2
#!/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