* usr/bin/byobu-launch: LP: #809525

- no need to search path on sourcing (thanks, Scott Moser)
* usr/bin/byobu-launcher-install: LP: #809525
  - prevent profile from getting sourced twice (thanks, Scott Moser)
This commit is contained in:
Dustin Kirkland 2011-07-19 12:13:55 -05:00
commit de1de53452
3 changed files with 24 additions and 23 deletions

4
debian/changelog vendored
View file

@ -94,6 +94,10 @@ byobu (4.18) unreleased; urgency=low
usr/lib/byobu/menu, usr/lib/byobu/network, usr/lib/byobu/menu, usr/lib/byobu/network,
usr/lib/byobu/updates_available, usr/share/byobu/keybindings/f-keys: usr/lib/byobu/updates_available, usr/share/byobu/keybindings/f-keys:
- comprehensively use $SED for MacOSX compatibility, LP: #812973 - comprehensively use $SED for MacOSX compatibility, LP: #812973
* usr/bin/byobu-launch: LP: #809525
- no need to search path on sourcing (thanks, Scott Moser)
* usr/bin/byobu-launcher-install: LP: #809525
- prevent profile from getting sourced twice (thanks, Scott Moser)
[ James Spencer ] [ James Spencer ]
* usr/lib/byobu/.constants: * usr/lib/byobu/.constants:

View file

@ -17,32 +17,30 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu" # 1) Prevent recursion, and multiple sourcing of profiles with the BYOBU_SOURCED_PROFILE environment variable.
[ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX # 2) Respect environment variables (LC_BYOBU and BYOBU_DISABLE) passable over SSH to disable
. "${BYOBU_PREFIX}/lib/${PKG}/.common" # Byobu launch. This puts that configurability on the SSH client,
# in addition to the server.
# Respect an environment variable passable over SSH to disable # To use over SSH, your /etc/ssh/sshd_config and /etc/ssh/ssh_config
# Byobu launch. This put that configurability on the SSH client, # must pass this variable with AcceptEnv and SendEnv.
# in addition to the server. # Note that LC_* are passed by default on Debian/Ubuntu, we'll optionally
# To use over SSH, your /etc/ssh/sshd_config and /etc/ssh/ssh_config # support LC_BYOBU=0
# must pass this variable with AcceptEnv and SendEnv. # And in your local bashrc:
# Note that LC_* are passed by default on Debian/Ubuntu, we'll optionally # $HOME/.bashrc: export LC_BYOBU=0
# support LC_BYOBU=0 # or edit your sshd_config, ssh_config, and set:
# And in your local bashrc: # $HOME/.bashrc: export BYOBU_DISABLE=1
# $HOME/.bashrc: export LC_BYOBU=0 if [ "$BYOBU_SOURCED_PROFILE" != "1" ] && [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then
# or edit your sshd_config, ssh_config, and set: BYOBU_SOURCED_PROFILE=1
# $HOME/.bashrc: export BYOBU_DISABLE=1 PKG="byobu"
if [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="/usr" || export BYOBU_PREFIX
. "${BYOBU_PREFIX}/lib/${PKG}/.common"
case "$-" in case "$-" in
*i*) *i*)
# Attempt to merge shell history across sessions/windows (works with a few exceptions) # Attempt to merge shell history across sessions/windows (works with a few exceptions)
shopt -s histappend || true shopt -s histappend || true
[ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a" [ -n "$PROMPT_COMMAND" ] && PROMPT_COMMAND="$PROMPT_COMMAND;history -a" || PROMPT_COMMAND="history -a"
# Source profile, as long as we won't recurse # Source profile
if [ -r "$HOME/.profile" ] && [ "$BYOBU_SOURCED_PROFILE" != "1" ]; then [ -r "$HOME/.profile" ] && . "$HOME/.profile"
BYOBU_SOURCED_PROFILE=1
. "$HOME/.profile"
fi
if byobu-launcher; then if byobu-launcher; then
# Wait very briefly for the no-logout flag to get written? # Wait very briefly for the no-logout flag to get written?
sleep 0.1 sleep 0.1
@ -58,5 +56,4 @@ if [ "$LC_BYOBU" != "0" ] && [ "$BYOBU_DISABLE" != "1" ]; then
esac esac
fi fi
true true
# vi: syntax=sh ts=4 noexpandtab # vi: syntax=sh ts=4 noexpandtab

View file

@ -42,7 +42,7 @@ update_flag() {
} }
install_launcher() { install_launcher() {
printf ". \$(which byobu-launch)\n" >> "$1" printf ". byobu-launch\n" >> "$1"
} }
# Sanitize the environment # Sanitize the environment