platform_external_mksh/mkshrc

27 lines
626 B
Text
Raw Normal View History

# Copyright (c) 2010, 2012, 2013, 2014
# Thorsten Glaser <tg@mirbsd.org>
# This file is provided under the same terms as mksh.
#-
# Minimal /system/etc/mkshrc for Android
#
# Support: https://launchpad.net/mksh
: ${HOME:=/data}
: ${HOSTNAME:=$(getprop ro.product.device)}
: ${HOSTNAME:=android}
: ${MKSH:=/system/bin/sh}
: ${SHELL:=$MKSH}
: ${TERM:=xterm}
: ${TMPDIR:=/data/local/tmp}
: ${USER:=$(id -un)}
export HOME HOSTNAME MKSH SHELL TERM TMPDIR USER
if (( USER_ID )); then PS1='$'; else PS1='#'; fi
PS4='[$EPOCHREALTIME] '; PS1='${|
local e=$?
(( e )) && REPLY+="$e|"
return $e
}$USER@$HOSTNAME:${PWD:-?} '"$PS1 "