## Administrative startup for /bin/sh# Place user customizations in ~/config/settings/profile#_ARCH=`getarch 2>/dev/null`if [ "$_ARCH" = "`getarch -p 2>/dev/null`" ] ; thenecho -e "\nWelcome to the Haiku shell.\n"PS1="\w"elseecho -e "\nSwitching to architecture `getarch`\n"PS1="[$_ARCH] \w"fiunset _ARCHexport PS1="\["'`if [ $? = 0 ]; then echo "\e[32m";else echo "\e[31m"; fi`'"\]$PS1\[\e[0m\]> "export USER=`id -un`export GROUP=`id -gn`if [ -z $BE_HOST_CPU ]; then. /boot/system/boot/SetupEnvironmentfiexport HISTFILESIZE=500export HISTCONTROL=ignoredupsalias ls="ls --color=auto"alias ll="ls -lA"alias la="ls -A"alias m="more"test -n "$BASH_VERSION" && shopt -s checkwinsizeif test -n "$KSH_VERSION"; thenps1_pwd() {local e=$? d=${PWD:-?}/ p=~[[ $p = ?(*/) ]] || d=${d/#$p\//\~/}print -nr -- "${d%/}"return $e}PS1=${PS1/'\w'/'$(ps1_pwd)'}elsetest -n "$BASH_VERSION" || PS1=$(printf '%s' "$PS1" | \sed 's/\\w/$PWD/')fifunction dir {ls -lF "$@";}for dir in `findpaths -Re B_FIND_PATH_DATA_DIRECTORY profile.d 2> /dev/null`; dofor i in $dir/*.sh; doif [ -r $i ]; then. $ifidoneunset idoneunset dirif [ -d /etc/profile.d ]; thenfor i in /etc/profile.d/*.sh; doif [ -r $i ]; then. $ifidoneunset ifi# Localeexport LC_MESSAGES=`locale --message`export LC_NUMERIC=`locale --format`export LC_TIME=`locale --time`export LC_COLLATE=$LC_MESSAGESexport LC_CTYPE=$LC_MESSAGESexport LC_MONETARY=$LC_NUMERIC