[squeak-dev] 3.11.3.2135 for Unix
Ian Piumarta
piumarta at gmail.com
Thu Sep 17 20:57:43 UTC 2009
Hi Markus,
Unfortunately GNU/Linux doesn't agree with the rest of the world
about the flags (including -f) understood by readlink (and Solaris
doesn't have it at all) so your suggestion isn't going to work.
How about this instead?
readlink="`which readlink`"
test -x "${readlink}" || readlink=echo
canonic () {(
cd "`dirname \"$1\"`"
dir="`basename \"$1\"`"
cd "`${readlink} \"${dir}\"`"
pwd
)}
bindir="`dirname \"$0\"`"
bindir="`canonic \"${bindir}\"`"
prefix="`dirname \"${bindir}\"`"
[...rest of file the same...]
Cheers,
Ian
More information about the Squeak-dev
mailing list
|