Skip to content

Instantly share code, notes, and snippets.

@goldsmith
Created October 29, 2013 23:42
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 goldsmith/7224712 to your computer and use it in GitHub Desktop.
Save goldsmith/7224712 to your computer and use it in GitHub Desktop.
A short shell program to add all Postgres commands in the default Mac OS X PostgreSQL to your $PATH. This probably will be done automatically, so check before running it.
# replace 9.3 with whatever version of PostgreSQL you have installed
# you can also link the commands to /usr/bin/ if you prefer
# before
########
# $ psql
# -bash: psql: command not found
for i in /Library/PostgreSQL/9.3/bin/*; do
t=${i##*/};
ln -s "$i" /usr/local/bin/"${t%.*}"
done
# after
#######
# $ sudo -u postgres psql
# Password:
# psql (9.3.1)
# Type "help" for help.
#
# postgres=#
@fangsterr
Copy link

+1

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