Yes I fully understand that this is a newbie forum and I was trying to tell you where you went wrong
Number 1 has nothing to do with what is installed but rather how and when the variable is being expanded, ie. the name of the variable at this point is irrelevant.
In the current here document you have used, all variables will be expanded by the shell, bash, prior to the rest of the process being run.
Hence you type:
Code:
cat >> ~/.bashrc <<EOF
export DEVKITXENON="/usr/local/xenon"
export PATH="$PATH:$DEVKITXENON/bin:$DEVKITXENON/usr/bin"
EOF
And before executing the cat / here document, the shell does:
Code:
cat >> ~/.bashrc <<EOF
export DEVKITXENON="/usr/local/xenon"
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/bin:/usr/bin"
EOF
So as the shell currently has no idea what DEVKITXENON is to be set to it is presumed to be not currently set and hence null.
My question surrounding whether or not DEVKITXENON needs to be known to the shell at login was regarding whether or not other applications will look for this to know the value, eg. like JAVA_HOME
can be set and recalled by java applications. If it does not need to be known except to set the PATH variable, then I would set the variable prior to running the here document
and forgo the first line:
Code:
DEVKITXENON="/usr/local/xenon"
cat >> ~/.bashrc <<EOF
export PATH="$PATH:$DEVKITXENON/bin:$DEVKITXENON/usr/bin"
Or if you wish you could also put it into the .bashrc file without the export, but then this brings us to option 2.
This option allows you to deliver the variables as is into your .bashrc and choose either to export or not based on the above information.
Assuming yes to the export:
Code:
cat >> ~/.bashrc <<"EOF"
export DEVKITXENON="/usr/local/xenon"
export PATH="$PATH:$DEVKITXENON/bin:$DEVKITXENON/usr/bin"
EOF
By placing the quotes around the here document ending you instruct it not to let the shell evaluate the variables and deliver them as written.
Hope this was clearer