Alle 13:36, martedì 4 gennaio 2005, Koenraad Lelong ha scritto:
Hi, I have a script to set a number of environment variables, including the PATH. It seems not to work. After the script terminates, the variables and the new path are gone or in their original state. Is this normal behaviour, or is there a misconfigured setting ? I modified the script to echo the path, and that's fine, but when I echo it after the script has run, it's in it's original state. Sugestions and pointers to reading material are welcome. The script : #!/bin/bash # dev-arm-qpe.sh script # location : /usr/bin #
if [ -z ${ORG_PATH} ] then ORG_PATH=${PATH} export ORG_PATH fi
if [ -z ${ORG_LD_LIBRARY_PATH} ] then ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH} export ORG_LD_LIBRARY_PATH fi
CROSSCOMPILE=/opt/Embedix/tools:/usr/local/x86/2.95.3/bin:/opt/Embedix/tool s QPEDIR=/opt/Qtopia/sharp QTDIR=/opt/Qtopia/sharp PATH=$QTDIR/bin:$QPEDIR/bin:$CROSSCOMPILE/bin:${ORG_PATH} TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-sharp-g++/
### Commented out next line. No need to set LD_LIBRARY_PATH ! ### LD_LIBRARY_PATH=$QTDIR/lib:${ORG_LD_LIBRARY_PATH}
export QPEDIR QTDIR PATH LD_LIBRARY_PATH TMAKEPATH PS1 echo "Altered environment for Sharp Zaurus Development ARM" -- Met vriendelijke groeten, Koenraad Lelong R&D Manager ACE electronics n.v.
If you need such environment variables you must set them in /etc/profile or, better, in .bashrc in your home directory. Bye emilio