From f5f0d15296eadbe2dd6ee4647d01c396925a26cf Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 7 Dec 2009 11:06:51 -0600 Subject: [PATCH] fix some profile initialization breakage --- byobu-janitor | 4 ++-- byobu-select-profile | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/byobu-janitor b/byobu-janitor index 976ad0a2..735acf73 100755 --- a/byobu-janitor +++ b/byobu-janitor @@ -60,7 +60,7 @@ fi # Seed the configuration [ -d "$HOME/.$PKG" ] || mkdir -p "$HOME/.$PKG" [ -r "$HOME/.$PKG/color" ] || byobu-select-profile -b W -f k >/dev/null 2>&1 -[ -r "$HOME/.$PKG/profile" ] || ln -sf /usr/share/$PKG/profiles/common "$PROFILE" +[ -r "$PROFILE" ] || ln -sf /usr/share/$PKG/profiles/common "$PROFILE" # Affects: Symlinks pointing to color profiles if [ -h "$PROFILE" ] && \ @@ -87,8 +87,8 @@ if [ -h "$PROFILE" ] && \ light_yellow) BG=Y; FG=k;; *) BG=W; FG=k;; esac - byobu-select-profile -b $BG -f $FG >/dev/null 2>&1 rm -f "$PROFILE" 2>/dev/null + byobu-select-profile -b $BG -f $FG >/dev/null 2>&1 fi [ -s "$HOME/.$PKG/keybindings" ] || echo "source /usr/share/$PKG/keybindings/common" > "$HOME/.$PKG/keybindings" diff --git a/byobu-select-profile b/byobu-select-profile index 6ce83bf9..01a5df8d 100755 --- a/byobu-select-profile +++ b/byobu-select-profile @@ -42,6 +42,8 @@ EOT # Initialize variables FILE="$HOME"/."$PKG"/color +PROFILE="$HOME/.$PKG/profile" +[ -r "$PROFILE" ] || ln -sf /usr/share/$PKG/profiles/common "$PROFILE" selected=-1 color=