Skip to content

Instantly share code, notes, and snippets.

@SwagDevOps
Created February 21, 2016 15:04
Show Gist options
  • Select an option

  • Save SwagDevOps/26d1d2504929bb453e58 to your computer and use it in GitHub Desktop.

Select an option

Save SwagDevOps/26d1d2504929bb453e58 to your computer and use it in GitHub Desktop.
Shell startup file used on Android (bash v4.1 & busybox v1.21) through ssh
# coding: utf-8
# file: /data/data/com.arachnoid.sshelper/home/.profile
# environ #######################
export PATH=/data/data/burrows.apps.busybox.paid/app_busybox:$PATH
export LD_LIBRARY_PATH=/data/data/burrows.apps.busybox.paid/app_busybox:$LD_LIBRARY_PATH
export HOME=/sdcard
# do anything when not run interactively
test -z "$PS1" && return 0
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
test -z "$BOARD" || {
PS1='\[\033[01;32m\]\u@${BOARD}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
}
# login mechanism ###############
test -z "$BASH_VERSION" && {
cd ~ && exec bash -i
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment