Thread: DIY - KeK
View Single Post
Old 08-10-2012, 01:14 PM   #218
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You're exporting in a subshell (because shell scripts are run in a child process, unless you exec it, which you probably don't want to do ^^), and expecting to see that propagated in the parent shell. An export propagates the var to the env of the current process and its *children*, not its parent .

If you want to modify your current shell's env from a file or something, source something, don't run a script .

In your case:

custom_env
Code:
PATH="/home/bin:/home/lib:/home/include:/home/share:${PATH}"
LD_LIBRARY_PATH="/home/usr/lib:/home/lib:/lib:/usr/lib"
source custom_env

Should do what you expect .

(Note that in most shells, . is an alias for source, so you can do . custom_env, too )

Last edited by NiLuJe; 08-10-2012 at 01:22 PM.
NiLuJe is offline   Reply With Quote