ensure that the status file exists

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-06-19 17:34:21 -05:00
commit 233dab6eb7
4 changed files with 8 additions and 4 deletions

View file

@ -24,7 +24,8 @@ if [ "$1" = "--detail" ]; then
exit 0
fi
. "$HOME/.$PKG/status" 2>/dev/null || true
. "/etc/$PKG/statusrc"
. "$HOME/.$PKG/status"
[ "$whoami" = "1" ] && at="@"
printf "\005{+b }%s%s\005{-}" "$at" $(hostname -s 2>/dev/null || hostname)

View file

@ -24,7 +24,8 @@ if [ "$1" = "--detail" ]; then
exit 0
fi
. "$HOME/.$PKG/status" 2>/dev/null || true
. "/etc/$PKG/statusrc"
. "$HOME/.$PKG/status"
[ "$hostname" = "1" ] && space=" "
[ "$whoami" = "1" ] && space=" "

View file

@ -24,7 +24,8 @@ if [ "$1" = "--detail" ]; then
exit 0
fi
. "$HOME/.$PKG/status" 2>/dev/null || true
. "/etc/$PKG/statusrc"
. "$HOME/.$PKG/status"
[ "$mem_used" = "1" ] && comma="," || whitespace=" "
mem=`free | grep -m 1 "^Mem:" | awk '{print $2}'`

3
byobu
View file

@ -86,7 +86,8 @@ fi
[ -s "$HOME/.$PKG/keybindings" ] || echo "source /usr/share/$PKG/keybindings/common" > "$HOME/.$PKG/keybindings"
sed -i "s/$OLDPKG/$PKG/g" "$HOME/.$PKG/keybindings"
# Ensure that their default windows are seeded
# Ensure that the user's configuration is seeded
[ -r "$HOME/.$PKG/status" ] || touch "$HOME/.$PKG/status"
[ -r "$HOME/.$PKG/windows" ] || touch "$HOME/.$PKG/windows"
if grep -qs "^[^#]" "$HOME/.$PKG/windows"; then
# User has some default windows, so don't launch motd+shell