aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@aura-online.co.uk>2011-09-28 17:49:52 +0000
committerJames Le Cuirot <chewi@aura-online.co.uk>2011-09-28 17:49:52 +0000
commitf2aa38e200b8171d33c4bc58514980d7e52a2f9d (patch)
tree54e60ded4a06fbe4c80ef795bd88247d16dceccf /src
parent[gjl] Prepend all PATH-like environment variables instead of replacing them. (diff)
downloadjava-config-f2aa38e200b8171d33c4bc58514980d7e52a2f9d.tar.gz
java-config-f2aa38e200b8171d33c4bc58514980d7e52a2f9d.tar.bz2
java-config-f2aa38e200b8171d33c4bc58514980d7e52a2f9d.zip
[gjl] Try harder to trim a trailing : from the end of PATH-like variables. This won't catch multiple trailing : but I think that's non-trivial in pure Bash.
svn path=/projects/java-config-2/trunk/; revision=8828
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gjl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gjl b/src/gjl
index 8e4eb9e..bf09c14 100755
--- a/src/gjl
+++ b/src/gjl
@@ -273,7 +273,7 @@ if __name__ == '__main__':
env = get_env(pkg)
for k, v in env.items():
if 'PATH' in k:
- print('export %s="%s:${%s}";' % ( k, v, k )).strip(':')
+ print('export %s="%s:${%s}"; %s=${%s%%:};' % ( k, v, k, k, k )).strip(':')
else:
print('export %s="%s";' % ( k, v ))