-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathstartj-simple.sh
executable file
·32 lines (28 loc) · 1.03 KB
/
startj-simple.sh
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
# @sourceme
# Hmmm. At very least this should call startj -simple, or startj should call this.
# Try to guess the top directory of j install
# If all below fails, then you should set it youself with export JPATH=...; source $JPATH/startj
if [ -z "$JPATH" ]
then
if [ -d "$HOME/j" ]
then export JPATH="$HOME/j"
# This doesn't work: bash cannot see it unless we call startj direct (no source)
elif [ -d "$(dirname "$0")" ]
then
export JPATH="$(dirname "$0")"
echo "startj: guessed JPATH=$JPATH"
else
echo "startj: Could not find JPATH. Not starting."
#env > /tmp/env.out
exit 0
fi
fi
#export PATH="$JPATH/tools:$PATH"
export PATH="$PATH:$JPATH/tools"
# Although we don't need things like aliases, we might need things like nvm setup.
# But nvm setup is usually done in ~/.bashrc, so we don't need it here.
# In future we may want to split the shell setup into interactive and non-interactive setups.
#[ -f "$JPATH/global.conf" ] && . "$JPATH/global.conf"
#[ -f "$JPATH/local.conf" ] && . "$JPATH/local.conf"
#. javainit
#. hugsinit