mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 21:21:06 +00:00
python-linkme-wrapper: optimize some escaping
This commit is contained in:
parent
d10679eed4
commit
906be2ea98
|
@ -14,13 +14,12 @@ PROG=$(basename "$0")
|
|||
SITES=
|
||||
|
||||
pypath() {
|
||||
BIN=$(dirname "$1")
|
||||
BIN=$(realpath -s "$BIN")
|
||||
BIN=$(realpath -s "$(dirname "$BIN")")
|
||||
ENV=$(dirname "$BIN")
|
||||
SITE="$ENV/lib/python2.7/site-packages"
|
||||
SITES="$SITES${SITES:+:}$SITE"
|
||||
|
||||
PRG=$BIN/$(readlink "$1")
|
||||
PRG="$BIN"/$(readlink "$1")
|
||||
|
||||
if test -L "$PRG"; then
|
||||
pypath "$PRG"
|
||||
|
@ -31,4 +30,4 @@ pypath $(realpath -s "$0")
|
|||
|
||||
export PYTHONPATH="$PYTHONPATH${PYTHONPATH:+:}$SITES"
|
||||
|
||||
exec $BIN/$PROG "$@"
|
||||
exec "$BIN/$PROG" "$@"
|
||||
|
|
Loading…
Reference in a new issue