Replaced dirname invocation with sed script

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@15456 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2003-01-03 01:01:11 +00:00
parent 12753e1fd3
commit fe36d29ede

View file

@ -32,7 +32,16 @@ if [ -z "$*" ]; then
exit 0
fi
mydir=`dirname "$0"`
# The original code
# mydir=`dirname "$0"`
# But it seems that on OpenStep, dirname is not available, so we use
# the following trick. The sed expression replaces /[^/]*$ (which
# means '/' followed by a sequence of zero or more non-'/' characters,
# followed by end-of-line) with nothing (that is, it deletes it), and
# what remains is the dirname.
mydir=`echo "$0" | sed -e "s#/[^/]*\\\$##"`
basepath="$1"
${mydir}/mkinstalldirs "$basepath" \