[ -e ~/.ConfigScripts.debug ] && echo " >> /etc/profile ..."
-# Source "~/.profile.user-1st", when available
-[ -r ~/.profile.user-1st ] && . ~/.profile.user-1st
-
# Setup locale and encoding
if [ -e ~/.ConfigScripts.debug ]; then
- echo " - TERM=\"$TERM\""
- echo " - LANG=\"$LANG\""
- echo " - LC_CTYPE=\"$LC_CTYPE\""
+ echo " - TERM=\"$TERM\""
+ echo " - LANG=\"$LANG\""
+ echo " - LC_CTYPE=\"$LC_CTYPE\""
fi
# Does LC_CTYPE or LANG indicate an UTF-8 terminal?
LC_encoding=""
LC_encoding="ISO8859-1"
esac
fi
-[ -e ~/.ConfigScripts.debug ] && echo " - LC_encoding=\"$LC_encoding\" (temp)"
+[ -e ~/.ConfigScripts.debug ] && echo " - LC_encoding=\"$LC_encoding\" (temp)"
# Set locale if it is not set or doesn't contain a dot:
[ "$LANG" = "${LANG#*.}" -a "$LANG" != "C" ] \
&& export LANG="${LANG:-de_DE}.${LC_encoding}"
-[ -e ~/.ConfigScripts.debug ] && echo " - LANG=\"$LANG\" (new)"
+[ -e ~/.ConfigScripts.debug ] && echo " - LANG=\"$LANG\" (new)"
# Clean up ...
unset LC_CTYPE LC_encoding 2>/dev/null
fi
# prepend optional directories to PATH ...
unset path
-for d in /Developer/usr/bin /usr/pkg/bin /usr/ucb /usr/lib/ccache /opt/*/bin; do
+for d in \
+ /usr/local/opt/ccache/libexec \
+ /Developer/usr/bin \
+ /usr/pkg/bin \
+ /usr/ucb \
+ /usr/lib/ccache \
+ /opt/*/bin
+do
if [ -d "$d" -o -h "$d" ]; then
[ -e "$d/.not_in_path" ] || path="$path$d:"
fi
[ -n "$path" ] && PATH="$path$PATH"
unset path
if [ "$LOGNAME" = "root" ]; then
- for d in /usr/pkg/sbin /opt/*/sbin; do
+ for d in \
+ /usr/pkg/sbin \
+ /opt/*/sbin
+ do
if [ -d "$d" -o -h "$d" ]; then
[ -e "$d/.not_in_path" ] || path="$path$d:"
fi
unset path
fi
# append optional directories to PATH ...
-for d in /usr/bin/X11 /usr/games /usr/share/php/bin; do
+for d in \
+ /usr/bin/X11 \
+ /usr/games \
+ /usr/share/php/bin
+do
if [ -d "$d" -o -h "$d" ]; then
[ -e "$d/.not_in_path" ] || PATH="$PATH:$d"
fi
[ -z "$MANPATH" ] \
&& MANPATH="/usr/local/share/man:/usr/share/man:/usr/man"
path=""
- for d in /usr/pkg/share/man /usr/pkg/man /opt/*/share/man /opt/*/man; do
+ for d in \
+ /usr/pkg/share/man \
+ /usr/pkg/man \
+ /opt/*/share/man \
+ /opt/*/man
+ do
[ -d "$d" -o -h "$d" ] && path="$path$d:"
done
[ -n "$path" ] && MANPATH="$path$MANPATH"
&& export LOCAL_HOME="/usr/local/home/$LOGNAME" \
|| export LOCAL_HOME="$HOME"
+# Source "~/.profile.user-1st", when available
+[ -r ~/.profile.user-1st ] && . ~/.profile.user-1st
+
# Setup environment to use local storage (no NFS, if possible!)
export XDG_CACHE_HOME="$LOCAL_HOME/.cache"
# read profile additions
if [ -d /etc/profile.d -o -d /usr/local/etc/profile.d ]; then
- for f in /etc/profile.d/* /usr/local/etc/profile.d/*; do
+ for f in \
+ /etc/profile.d/* \
+ /usr/local/etc/profile.d/*
+ do
[ -r "$f" ] || continue
case "$f" in
*.csh)
*) return ;;
esac
+# Use "xterm-256color" for xterm's (and the like) when it is available
+[ "$TERM" = "xterm" -a -r "/usr/share/terminfo/x/xterm+256color" ] \
+ && export TERM="xterm-256color"
+
# validate terminal definition
type -t tset >/dev/null && eval `tset -s -Q`
# Reminders (once every 60 minutes)
if [ -z `find ~/.last_reminder -mmin -60 2>/dev/null` ]; then
- [ -e ~/.ConfigScripts.debug ] && echo " - Reminders ..."
- if [ "$(type -t icalBuddy >/dev/null)" -a "$LOGNAME" != "root" ]; then
+ [ -e ~/.ConfigScripts.debug ] && echo " - Reminders ..."
+ if [ "$(type -t icalBuddy 2>/dev/null)" -a "$LOGNAME" != "root" ]; then
# icalBuddy(1)
case "$LANG" in
*.UTF*) bul="•"; bul_imp="!"; sep="»"; ;;
eventsToday+1 2>/dev/null
[ $? -eq 0 ] && echo
unset bul bul_imp sep
+ [ -w ~/ ] && touch ~/.last_reminder
else
# remind(1)
- if [ "$(type -t remind >/dev/null)" -a -r ~/.remind ]; then
+ if [ "$(type -t remind 2>/dev/null)" -a -r ~/.remind ]; then
remind -h -g -t5 ~/.remind | \
grep -v '^Reminders for ' | grep -v '^$'
[ $? -eq 0 ] && echo
fi
+ [ -w ~/ ] && touch ~/.last_reminder
fi
- [ -w ~/ ] && touch ~/.last_reminder
fi
# bash-specific initialization