From 584d3c25ba6152c780a7bef65e25618a9deb4507 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 28 Sep 2011 12:34:38 +0200 Subject: [PATCH 1/3] Use BYOBU_PREFIX explicitly. LP: #861302 --- usr/bin/byobu | 2 +- usr/bin/byobu-launcher-install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/byobu b/usr/bin/byobu index 7657c05b..63642c86 100755 --- a/usr/bin/byobu +++ b/usr/bin/byobu @@ -95,7 +95,7 @@ case $BYOBU_BACKEND in fi export BYOBU_WINDOWS # Launch shell, unless the user has default windows set to launch - uncommented_lines < "$BYOBU_WINDOWS" && DEFAULT_WINDOW= || DEFAULT_WINDOW="-t ${SHELL##*/} byobu-shell" + uncommented_lines < "$BYOBU_WINDOWS" && DEFAULT_WINDOW= || DEFAULT_WINDOW="-t ${SHELL##*/} ${BYOBU_PREFIX}/bin/byobu-shell" # Check if our terminfo supports 256 colors if command -v tput >/dev/null; then if [ "$(tput colors 2>/dev/null || echo 0)" = "256" ]; then diff --git a/usr/bin/byobu-launcher-install b/usr/bin/byobu-launcher-install index 0adb4276..93d251b2 100755 --- a/usr/bin/byobu-launcher-install +++ b/usr/bin/byobu-launcher-install @@ -42,7 +42,7 @@ update_flag() { } install_launcher() { - printf "_byobu_sourced=1 . byobu-launch\n" >> "$1" + printf "_byobu_sourced=1 . ${BYOBU_PREFIX}/bin/byobu-launch\n" >> "$1" } # Sanitize the environment From d9eaf1ceddd54ba65746f08317acacc29b594fec Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 28 Sep 2011 13:14:56 +0200 Subject: [PATCH 2/3] Improve remove_launcher: - ignore comments - handle prefixed "$PKG-launch" (r1658) and fix match at end of line --- usr/bin/byobu-launcher-uninstall | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/bin/byobu-launcher-uninstall b/usr/bin/byobu-launcher-uninstall index 0b34b33a..e63ecb99 100755 --- a/usr/bin/byobu-launcher-uninstall +++ b/usr/bin/byobu-launcher-uninstall @@ -25,7 +25,8 @@ PKG="byobu" remove_launcher() { dest=$1 if [ -w "$dest" ]; then - $SED -i -e "/ $PKG-launch/d" -e "/ screen-launch/d" "$dest" + # print any comments, and remove lines invoking byobu: + $SED -i -e '/^\s*#/p' -e "/\b$PKG-launch\$/d" -e "/ screen-launch/d" "$dest" fi } From 4501fcf3ab523ca3cc18198bff7b99c56b835947 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 29 Sep 2011 09:27:08 +0200 Subject: [PATCH 3/3] remove_launcher: just keep any comments, instead of duplicating/printing them. --- usr/bin/byobu-launcher-uninstall | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/bin/byobu-launcher-uninstall b/usr/bin/byobu-launcher-uninstall index e63ecb99..9ad5b208 100755 --- a/usr/bin/byobu-launcher-uninstall +++ b/usr/bin/byobu-launcher-uninstall @@ -25,8 +25,8 @@ PKG="byobu" remove_launcher() { dest=$1 if [ -w "$dest" ]; then - # print any comments, and remove lines invoking byobu: - $SED -i -e '/^\s*#/p' -e "/\b$PKG-launch\$/d" -e "/ screen-launch/d" "$dest" + # keep any comments, and remove lines invoking byobu: + $SED -i -e '/^\s*#/n' -e "/\b$PKG-launch\$/d" -e "/ screen-launch/d" "$dest" fi }