diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-07-15 11:19:46 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-07-15 13:26:12 +0200 |
commit | f39231435a0d28c50bd3117aae68d904ccc45b7a (patch) | |
tree | f28425909a8bb19dee1803f830cf4f754cfad075 /bin | |
parent | fc9dd813d76d759863a995e23e229907152756ac (diff) | |
download | ptxdist-f39231435a0d28c50bd3117aae68d904ccc45b7a.tar.gz ptxdist-f39231435a0d28c50bd3117aae68d904ccc45b7a.tar.xz |
[check_path] fix removal of "." from the PATH
Without this patch the PATH=".:/foo:.:/bar:." will be transformed into
"/foo/bar".
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ptxdist | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 466c71285..824c7dd1a 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -174,7 +174,7 @@ check_uid() { # remove "." from the PATH # check_path() { - PATH="$(echo "${PATH}" | sed -e "s/:\.$//" -e "s/^\.://" -e "s/:\.://")" + PATH="$(echo "${PATH}" | sed -e "s/\(:\.\)\+:/:/g" -e "s/\(^\.:\|:\.$\)//g")" } |