X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=set-path;h=314de26660e56d503faa6ffce076eb2421040a07;hb=99b2740dabc2164f36f5acfdccd2234b352136ab;hp=04dc7c55cc45843052e25db6564c9d115817a3da;hpb=80edd25c5eeeef4dee8d86c90d2fe931adb80467;p=audio-cdr-video.git diff --git a/set-path b/set-path index 04dc7c5..314de26 100644 --- a/set-path +++ b/set-path @@ -1,4 +1,10 @@ -CWD="`pwd`" -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