summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-07-15 11:19:46 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-07-15 13:26:12 +0200
commitf39231435a0d28c50bd3117aae68d904ccc45b7a (patch)
treef28425909a8bb19dee1803f830cf4f754cfad075 /bin
parentfc9dd813d76d759863a995e23e229907152756ac (diff)
downloadptxdist-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-xbin/ptxdist2
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")"
}