Lines 334-341
Link Here
|
334 |
penvnotice = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" |
335 |
penvnotice = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" |
335 |
penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" |
336 |
penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" |
336 |
cenvnotice = penvnotice[:] |
337 |
cenvnotice = penvnotice[:] |
|
|
338 |
fenvnotice = penvnotice[:] |
337 |
penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n" |
339 |
penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n" |
338 |
cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n" |
340 |
cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n" |
|
|
341 |
fenvnotice += "# GO INTO /etc/fish/config.fish NOT /etc/profile.fish\n\n" |
339 |
|
342 |
|
340 |
#create /etc/profile.env for bash support |
343 |
#create /etc/profile.env for bash support |
341 |
outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.env")) |
344 |
outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.env")) |
Lines 357-359
Link Here
|
357 |
for x in env_keys: |
360 |
for x in env_keys: |
358 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
361 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
359 |
outfile.close() |
362 |
outfile.close() |
|
|
363 |
|
364 |
#create /etc/profile.fish for fish support |
365 |
outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.fish")) |
366 |
outfile.write(fenvnotice) |
367 |
|
368 |
env_path = " ".join("'{!s}'".format(v) for v in specials["PATH"]) |
369 |
for k in (x for x in env_keys if x != "PATH"): |
370 |
outfile.write("set -gx {!s} '{!s}'\n".format(k, env[k])) |
371 |
outfile.write("set -gx PATH {!s}\n".format(env_path)) |
372 |
outfile.close() |