1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

python-linkme-wrapper: optimize some escaping

This commit is contained in:
Florian Friesdorf 2013-01-22 21:19:37 +01:00
parent d10679eed4
commit 906be2ea98

View file

@ -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" "$@"