HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #716

Ticket #716: openjdk_setup_env.sh

File openjdk_setup_env.sh, 932 bytes (added by bartolomiew, 2 years ago)

setup env

Line 
1#!/bin/sh
2_progress () {
3        notify --type progress --group openJDK \
4                --icon /boot/system/kernel_x86 \
5                --messageID $0_$$ \
6                --title "Set OpenJDK env..." \
7                --progress "$1" "$2" >/dev/null
8}
9
10_progress 0.2 ".profile"
11cd
12if [ -e .profile ];
13then
14        echo
15else
16        touch .profile
17fi
18
19_progress 0.4 "JAVA_HOME"
20grep "export JAVA_HOME=" .profile >/dev/null
21if [ $? == 1 ];
22then
23        echo "export JAVA_HOME=\`finddir B_COMMON_DIRECTORY\`/jdk" >>.profile
24fi
25
26_progress 0.6 "PATH"
27grep "export PATH=\$JAVA_HOME/bin:\$PATH" .profile >/dev/null
28if [ $? == 1 ];
29then
30        echo "export PATH=\$JAVA_HOME/bin:\$PATH" >>.profile
31fi
32
33_progress 0.8 "LIBRARY_PATH"
34export _SEARCH=$JAVA_HOME/jre/lib/i386
35echo $_SEARCH | grep $LIBRARY_PATH >/dev/null
36grep "export LIBRARY_PATH=\$JAVA_HOME/jre/lib/i386:\$LIBRARY_PATH" .profile >/dev/null
37if [ $? == 1 ];
38then
39        echo "export LIBRARY_PATH=\$JAVA_HOME/jre/lib/i386:\$LIBRARY_PATH" >>.profile
40fi
41_progress 1.0 "done"

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/