mirror of
https://github.com/RasppleII/a2cloud.git
synced 2025-01-02 21:29:37 +00:00
Add a2cloudrc to source tree
This commit is contained in:
parent
1b09c5e525
commit
6f3837091e
34
setup/a2cloudrc.txt
Normal file
34
setup/a2cloudrc.txt
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
source /usr/local/etc/a2cloud-aliases
|
||||||
|
|
||||||
|
if [[ -f /usr/local/java/bin/java ]]; then
|
||||||
|
export JAVA_HOME=/usr/local/java
|
||||||
|
elif [[ -f /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/bin/java ]]; then # RPi
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt
|
||||||
|
elif [[ -f /usr/lib/jvm/java-8-oracle/bin/java ]]; then # webupd8
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
|
||||||
|
elif [[ -f /usr/lib/jvm/java-8-oracle/jre/bin/java ]]; then # Ubuntu 14.04 RPi2
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre
|
||||||
|
elif [[ -f /usr/lib/jvm/jdk-7-oracle-armhf/bin/java ]]; then # RPi
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/jdk-7-oracle-armhf
|
||||||
|
elif [[ -f /usr/lib/jvm/jdk-7-oracle/bin/java ]]; then # webupd8
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/jdk-7-oracle
|
||||||
|
fi
|
||||||
|
[[ ! $(grep java <<< $PATH) ]] && PATH=$PATH:$JAVA_HOME/bin
|
||||||
|
|
||||||
|
if [[ -f /usr/local/etc/a2cloud-lang ]]; then
|
||||||
|
lang8bit=$(cat /usr/local/etc/a2cloud-lang)
|
||||||
|
else
|
||||||
|
lang8bit=C
|
||||||
|
fi
|
||||||
|
if [[ ${TERM:0:6} == "screen" ]]; then
|
||||||
|
myTTY=$(ps hp $(ps hp $(ps hp $$ -o ppid) -o ppid) -o tty)
|
||||||
|
else
|
||||||
|
myTTY=$(tty)
|
||||||
|
export ttyTERM="$TERM"
|
||||||
|
fi
|
||||||
|
if [[ $(grep ttyUSB <<< $myTTY) || $(grep ttyAMA <<< $myTTY) ]]; then
|
||||||
|
LANG=$lang8bit
|
||||||
|
fi
|
||||||
|
if [[ ${TERM:0:6} == "screen" ]]; then
|
||||||
|
TERM=$ttyTERM
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user