X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=set-path;h=314de26660e56d503faa6ffce076eb2421040a07;hb=826caf74cd01d89b3b5de6f116f123cfde4fe095;hp=b5051bccc4b9c446cfa1727d1ff6818a1d41281b;hpb=c48e56e765f1974af28e3a89d08e63768ff75e31;p=audio-cdr-video.git diff --git a/set-path b/set-path index b5051bc..314de26 100644 --- a/set-path +++ b/set-path @@ -1,5 +1,10 @@ -CWD="`dirname \"$0\"`" -CWD="`abspath.py \"$CWD\"`" -if echo "$PATH" | grep -vq "\(^\|:\)$CWD\(:\|$\)"; then - PATH="$CWD:$PATH" +START_DIR="`pwd`" +cd "`dirname \"$0\"`" +PROG_DIR="`pwd`" +cd "$START_DIR" +if echo "$PATH" | grep -qv "\(^\|:\)$PROG_DIR\(:\|$\)"; then + PATH="$PROG_DIR:$PATH" fi +START_DIR='' +PROG_DIR='' +unset START_DIR PROG_DIR