OSDN Git Service

install copy of shell in vendor partition
[android-x86/external-mksh.git] / mkshrc_vendor
diff --git a/mkshrc_vendor b/mkshrc_vendor
new file mode 100644 (file)
index 0000000..27d3982
--- /dev/null
@@ -0,0 +1,20 @@
+# 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
+
+: ${HOSTNAME:=$(getprop ro.product.device)}
+: ${HOSTNAME:=android}
+export HOSTNAME
+
+if (( USER_ID )); then PS1='$'; else PS1='#'; fi
+PS4='[$EPOCHREALTIME] '; PS1='${|
+       local e=$?
+
+       (( e )) && REPLY+="$e|"
+
+       return $e
+}$HOSTNAME:${PWD:-?} '"$PS1 "