Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: halma on September 13, 2018, 04:29:26 PM
-
hi,
i am trying to get ccache extension working under TC9.x/x64
i have an ccache tce.installed script which creates the symlinks for ccache compilers on bootup, but i need to
set an $PATH environment variable too. Usually each shellscript has its own process structure/childs/parent.
Someone has an idea how it is possible to set an $PATH environment variable which is like global avaible ?
what i tried so far:
#!/bin/sh
echo "#!/bin/sh" > export-variable-script.sh
echo "" >> export-variable-script.sh
echo "export foo=bar" >> export-variable-script.sh
chmod u+x export-variable-script.sh
source ./export-variable-script.sh
but
echo $foo
returns nothing
if possible the code should be undependend, not set export in ~/.bashrc or ~/.profile
Thanks
-
Hi halma
Setting it in ~/.profile would probably be the simplest solution. After adding it to ~/.profile you'll need to logout/login or
reboot for it to take affect.