2
0
mirror of https://gitlab.com/Nanolx/NanoDroid synced 2024-10-31 09:20:23 +00:00
NanoDroid/Full/system/etc/bashrc

47 lines
910 B
Bash
Raw Normal View History

# /system/etc/bashrc
export SHELL=${BASH}
2018-01-23 20:11:52 +00:00
2019-05-05 19:19:34 +00:00
# select storage path
if [ -n ${EXTERNAL_STORAGE} ]; then
2019-05-05 19:20:28 +00:00
export HOME="${EXTERNAL_STORAGE}"
2019-05-05 19:06:09 +00:00
else
2019-05-05 19:19:34 +00:00
if [ -w /sdcard ]; then
2019-05-05 19:20:28 +00:00
export HOME="/sdcard"
2019-05-05 19:19:34 +00:00
elif [ -w /storage/self/primary ]; then
2019-05-05 19:20:28 +00:00
export HOME="/storage/self/primary"
2019-05-05 19:19:34 +00:00
elif [ -w /data/media/0 ]; then
2019-05-05 19:20:28 +00:00
export HOME="/data/media/0"
2019-05-05 19:19:34 +00:00
fi
2019-05-05 19:06:09 +00:00
fi
export TMPDIR=${HOME}/.bash_tmp
export HISTFILE=${HOME}/.bash_history
mkdir -p ${TMPDIR}
2018-01-23 20:11:52 +00:00
export TERM=xterm
export PAGER=less.bin
2018-01-23 20:11:52 +00:00
[[ $- != *i* ]] && return
shopt -s checkwinsize
2018-01-23 20:11:52 +00:00
shopt -s histappend
alias su="su --shell ${SHELL}"
2018-02-07 20:21:09 +00:00
alias ls="ls --color=auto"
2018-02-07 20:22:48 +00:00
alias grep="grep --color=auto"
2018-01-23 20:11:52 +00:00
red="\[\033[01;38;5;1m\]"
gre="\[\033[01;38;5;2m\]"
blu="\[\033[01;38;5;4m\]"
whi="\[\033[01;38;5;7m\]"
2018-02-08 22:05:36 +00:00
export HOSTNAME=$(getprop ro.product.device)
export PS1="${whi}[ ${blu}\$(whoami) ${whi}@ ${red}${HOSTNAME} ${whi}: ${gre}\w ${whi}] "
2018-01-23 20:11:52 +00:00
resize >/dev/null
clear
2018-02-06 20:14:39 +00:00
cd ${HOME}