You are not logged in.
Hi,
I maintain an AUR PKGBUILD (aacskeys) that installs first as a depends the meta package java-environement, which offers either jdk7-openjdk or openjdk6 (to the user's choice). My problem is that I need to access $JAVA_HOME before I build my package. When the java-environement is installed (assuming it is the first time), JAVA_HOME is not yet set in bash. There are scripts in /etc/profile.d that set it, but they are only run after reboot, which means the PKGBUILD fails if java was not already installed on the machine. Furthermore, depending on the chosen java, the script name differs, which means I cannot be sure which script to source to set JAVA_HOME.
So how can I source a file that will set JAVA_HOME when I do not know exactly which file sets JAVA_HOME in /etc/profile.d? Is it safe to source all files in /etc/profile.d at any time (using "source /etc/profile.d/*")? Or is there a command, or a clever trick to do this?
EDIT: I did further research. Is this command safe during PKGBUILD execution: "source /etc/profile" ?
Thanks,
Zeb
Last edited by zebulon (2012-03-14 07:14:50)
Offline
AFAIK "source /etc/profile" should work in your case.
Offline
Thank you.
Offline