-
Notifications
You must be signed in to change notification settings - Fork 1
/
shell.local
72 lines (59 loc) · 1.28 KB
/
shell.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# -*- mode: shell-script -*-
#
# Modify this file and copy it to ~/.shell.local.
#
# To switch java environment:
#
# $ set_local_java $JAVA7_HOME
# $ set_local_java $JAVA8_HOME
#
export NO_LOCAL_PATH=$PATH
function set_local_path {
export PATH=$NO_LOCAL_PATH
if [ \( -d $JAVA_HOME \) -a \( -e "$JAVA_HOME/bin/java" \) ]
then
export PATH=$JAVA_HOME/bin:$PATH
fi
if [ \( -d $DART_HOME \) -a \( -e "$DART_HOME/bin/dart" \) ]
then
export PATH=$DART_HOME/bin:$PATH
fi
}
# Java
#
java7_ver=jdk1.7.0_71.jdk
java7_dir=/Library/Java/JavaVirtualMachines/${java7_ver}/Contents/Home
java8_ver=jdk1.8.0_25.jdk
java8_dir=/Library/Java/JavaVirtualMachines/${java8_ver}/Contents/Home
export JAVA7_HOME=$java7_dir
export JAVA8_HOME=$java8_dir
export JAVA_HOME=$JAVA8_HOME
function set_local_java {
if [ \( -d $1 \) -a \( -e "$1/bin/java" \) ]
then
export JAVA_HOME=$1
else
echo "WARNING: failed to set JAVA_HOME"
echo
echo "USAGE: set_java <JAVA_HOME>"
fi
set_local_path
}
# Python
#
# if [ -e ~/Local/env/venv/bin/activate ]
# then
# . ~/Local/env/venv/bin/activate
# fi
# Ruby
#
# if [ -e ~/.rbenv/shims ]
# then
# PATH=~/.rbenv/shims:$PATH
# fi
# Dart
#
DART_HOME=/Applications/dart/dart-sdk
#
#
set_local_path