jaymode
January 27th, 2007, 11:37 AM
Hi,
I do not know much about shell scripting and am trying to figure out why this one doesn't work. It was made automatically by a program to export some environment variables however it does not add them to the $PATH. It may be a simple fix. Here is the script:
PLATFORM=lin
XILINX_EDK=/video/microblaze/EDK/
export XILINX_EDK
if [ -n "$PATH" ]
then
PATH=${XILINX_EDK}/bin/${PLATFORM}:${XILINX_EDK}/gnu/microblaze/${PLATFORM}/bin:${XILINX_EDK}/gnu/powerpc-eabi/${PLATFORM}/bin:${PATH}
else
PATH=${XILINX_EDK}/bin/${PLATFORM}:${XILINX_EDK}/gnu/microblaze/${PLATFORM}/bin:${XILINX_EDK}/gnu/powerpc-eabi/${PLATFORM}/bin
fi
export PATH
if [ -n "$LD_LIBRARY_PATH" ]
then
LD_LIBRARY_PATH=${XILINX_EDK}/bin/${PLATFORM}:${LD_LIBRARY_PATH}
else
LD_LIBRARY_PATH=${XILINX_EDK}/bin/${PLATFORM}
fi
export LD_LIBRARY_PATH
myxilinxrc=${HOME}/.qt/xilinxrc
if [ -d "${SYSCONF}/xilinxrc" -a ! -f "$myxilinxrc" ]
then cp "${SYSCONF}/xilinxrc" "$myxilinxrc"
elif [ -f "/Xilinx/xilinxrc" -a ! -f "$myxilinxrc" ]
then cp "/Xilinx/xilinxrc" "$myxilinxrc"
fi
Thanks in advance.
I do not know much about shell scripting and am trying to figure out why this one doesn't work. It was made automatically by a program to export some environment variables however it does not add them to the $PATH. It may be a simple fix. Here is the script:
PLATFORM=lin
XILINX_EDK=/video/microblaze/EDK/
export XILINX_EDK
if [ -n "$PATH" ]
then
PATH=${XILINX_EDK}/bin/${PLATFORM}:${XILINX_EDK}/gnu/microblaze/${PLATFORM}/bin:${XILINX_EDK}/gnu/powerpc-eabi/${PLATFORM}/bin:${PATH}
else
PATH=${XILINX_EDK}/bin/${PLATFORM}:${XILINX_EDK}/gnu/microblaze/${PLATFORM}/bin:${XILINX_EDK}/gnu/powerpc-eabi/${PLATFORM}/bin
fi
export PATH
if [ -n "$LD_LIBRARY_PATH" ]
then
LD_LIBRARY_PATH=${XILINX_EDK}/bin/${PLATFORM}:${LD_LIBRARY_PATH}
else
LD_LIBRARY_PATH=${XILINX_EDK}/bin/${PLATFORM}
fi
export LD_LIBRARY_PATH
myxilinxrc=${HOME}/.qt/xilinxrc
if [ -d "${SYSCONF}/xilinxrc" -a ! -f "$myxilinxrc" ]
then cp "${SYSCONF}/xilinxrc" "$myxilinxrc"
elif [ -f "/Xilinx/xilinxrc" -a ! -f "$myxilinxrc" ]
then cp "/Xilinx/xilinxrc" "$myxilinxrc"
fi
Thanks in advance.