From 36856a4406643a9298b8122eae004f6731269703 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 29 Jun 2011 01:04:08 +0000 Subject: [PATCH] but also make sure that we won't recurse, using a variable flag --- debian/changelog | 2 +- usr/bin/byobu-launch | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2b9c8057..7ee137d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ byobu (4.17) unreleased; urgency=low * usr/bin/byobu-launch: LP: #802646 - ensure that .profile gets sourced if launching byobu by default, - but also make sure that we won't recurse! + but also make sure that we won't recurse, using a variable flag * usr/lib/byobu/cpu_temp: LP: #799237, #802819 - fix temperature on Atom D510 * usr/bin/byobu-status: diff --git a/usr/bin/byobu-launch b/usr/bin/byobu-launch index ee9ceee0..eecca850 100755 --- a/usr/bin/byobu-launch +++ b/usr/bin/byobu-launch @@ -39,8 +39,9 @@ if [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then shopt -s histappend || true [ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a" # Source profile, as long as we won't recurse - if [ -r "$HOME/.profile" ]; then - (sed -e "s/#.*//" "$HOME/.profile" | grep -qs "$PKG-launch") || . "$HOME/.profile" + if [ -r "$HOME/.profile" ] && [ "$BYOBU_SOURCED_PROFILE" = "0" ]; then + BYOBU_SOURCED_PROFILE=1 + . "$HOME/.profile" fi if byobu-launcher; then # Wait very briefly for the no-logout flag to get written?