mirror of
https://github.com/gnustep/tools-make.git
synced 2025-06-03 18:50:55 +00:00
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:
parent
12753e1fd3
commit
fe36d29ede
1 changed files with 10 additions and 1 deletions
|
@ -32,7 +32,16 @@ if [ -z "$*" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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"
|
basepath="$1"
|
||||||
|
|
||||||
${mydir}/mkinstalldirs "$basepath" \
|
${mydir}/mkinstalldirs "$basepath" \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue