Skip to content

Instantly share code, notes, and snippets.

@patsch
Created October 15, 2011 07:41
Show Gist options
  • Save patsch/1289230 to your computer and use it in GitHub Desktop.
Save patsch/1289230 to your computer and use it in GitHub Desktop.
Problems with the unix-whereis gem on MacOSX Lion? rename /usr/bin/whereis to /usr/bin/whereis.org and copy this file to /usr/bin instead
#!/bin/sh
# jpegoptim uses the unix-whereis gem which calls whereas
# with '-b' - Mac's whereis does not understand that
# so I fixed up whereis to ignore the '-b' parameter here
# by renaming the original 'whereis' to 'whereis.org' and
# installing this script in place of the original /usr/bin/whereis executable
# if you plan on using the jpegoptim ruby gem (which lead to this patch for me)
# you will also need to ensure that it is installed in a path that whereis looks in
# or (my solution), softlink it:
# cd /usr/bin
# ln -s /usr/local/bin/jpepoptim
#
# by [email protected]
if [ $# -ge 1 ]
then
if [ $1 = "-b" ]
then
shift
fi
fi
/usr/bin/whereis.org $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment