wineprefixcreate: Make path searching relative.
This commit is contained in:
parent
52645e1144
commit
b1be724511
|
@ -70,7 +70,7 @@ bin2res$(EXEEXT): bin2res.o
|
|||
$(CC) $(CFLAGS) -o $@ bin2res.o $(LIBPORT)
|
||||
|
||||
wineprefixcreate: wineprefixcreate.in
|
||||
sed -e 's,@dlldir\@,$(dlldir),g' -e 's,@datadir\@,$(datadir),g' $(SRCDIR)/wineprefixcreate.in >$@ || ($(RM) $@ && false)
|
||||
sed -e "s,@bintodlldir\@,`$(RELPATH) $(bindir) $(dlldir)`,g" -e "s,@bintodatadir\@,`$(RELPATH) $(bindir) $(datadir)`,g" $(SRCDIR)/wineprefixcreate.in >$@ || ($(RM) $@ && false)
|
||||
chmod +x wineprefixcreate
|
||||
|
||||
install install-lib:: wineprefixcreate
|
||||
|
|
|
@ -36,8 +36,31 @@ usage()
|
|||
|
||||
set -e
|
||||
|
||||
dlldir="@dlldir@"
|
||||
datadir="@datadir@/wine"
|
||||
bindir=""
|
||||
case "$0" in
|
||||
*/*)
|
||||
# $0 contains a path, use it
|
||||
bindir=`dirname "$0"`
|
||||
;;
|
||||
*)
|
||||
# no directory in $0, search in PATH
|
||||
saved_ifs=$IFS
|
||||
IFS=:
|
||||
for d in $PATH
|
||||
do
|
||||
IFS=$saved_ifs
|
||||
if [ -x "$d/$0" ]
|
||||
then
|
||||
bindir="$d"
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
bindir=`cd "$bindir" && pwd`
|
||||
dlldir="$bindir/@bintodlldir@"
|
||||
datadir="$bindir/@bintodatadir@"
|
||||
|
||||
do_wait=0
|
||||
quiet=0
|
||||
|
|
Loading…
Reference in New Issue