Skip to content

Commit

Permalink
Merge pull request #33 from ojwb/fix-homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartsmith authored Aug 2, 2023
2 parents b1a531a + ae89d09 commit 8ee77f5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eatmydata.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ usage()

# Detect operation mode. If this script is run via symlink, look for basename
# in the PATH and execute it.
cmd=
if [ -L "$0" ]; then
# Symlink mode. Get command to execute from the basename of $0.
cmd="`basename "$0"`"
if [ "$cmd" = "eatmydata" ] ; then
# Don't engage symlink mode for a symlink from "eatmydata" though as
# that breaks with how homebrew installs each package in its own
# prefix and symlinks the binaries into a common "bin" directory.
cmd=
fi
fi

if [ -n "$cmd" ] ; then
set -- "$cmd" "$@"
else
# Normal mode
Expand Down

0 comments on commit 8ee77f5

Please sign in to comment.