mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
debian/rules, usr/bin/byobu, usr/bin/byobu-launcher: deprecate the
launcher script as a separate script; do this in /usr/bin/byobu
This commit is contained in:
parent
8dd107ba25
commit
4427f70531
4 changed files with 16 additions and 43 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
||||||
byobu (2.52) unreleased; urgency=low
|
byobu (2.52) unreleased; urgency=low
|
||||||
|
|
||||||
* UNRELEASED
|
* debian/rules, usr/bin/byobu, usr/bin/byobu-launcher: deprecate the
|
||||||
|
launcher script as a separate script; do this in /usr/bin/byobu
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 03 Feb 2010 10:56:23 -0800
|
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 03 Feb 2010 10:56:23 -0800
|
||||||
|
|
||||||
|
|
1
debian/rules
vendored
1
debian/rules
vendored
|
@ -54,6 +54,7 @@ install: build install-po
|
||||||
#dh_link usr/bin/byobu-status usr/bin/screen-profiles-status
|
#dh_link usr/bin/byobu-status usr/bin/screen-profiles-status
|
||||||
#dh_link usr/bin/byobu-launcher usr/bin/screen-launcher
|
#dh_link usr/bin/byobu-launcher usr/bin/screen-launcher
|
||||||
dh_link usr/share/byobu/keybindings/f-keys usr/share/byobu/keybindings/common
|
dh_link usr/share/byobu/keybindings/f-keys usr/share/byobu/keybindings/common
|
||||||
|
dh_link usr/bin/byobu usr/bin/byobu-launcher
|
||||||
for i in black dark dark_blue dark_cyan dark_green dark_purple dark_red dark_yellow light light_blue light_cyan light_green light_purple light_red light_yellow; do dh_link usr/share/byobu/profiles/common usr/share/byobu/profiles/$${i}; done
|
for i in black dark dark_blue dark_cyan dark_green dark_purple dark_red dark_yellow light light_blue light_cyan light_green light_purple light_red light_yellow; do dh_link usr/share/byobu/profiles/common usr/share/byobu/profiles/$${i}; done
|
||||||
dh_install -X.bzr
|
dh_install -X.bzr
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,19 @@ grep -qs "^[^#]" "$HOME/.$PKG/windows" && DEFAULT_WINDOW= || DEFAULT_WINDOW="mot
|
||||||
|
|
||||||
# Now let's execute screen!
|
# Now let's execute screen!
|
||||||
if [ "$#" = "0" ]; then
|
if [ "$#" = "0" ]; then
|
||||||
|
out=$(screen -wipe 2>/dev/null) || true
|
||||||
|
if echo "$out" | grep -qsi "^No Sockets found in "; then
|
||||||
|
# Start new session
|
||||||
exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" -t shell $DEFAULT_WINDOW
|
exec screen $SCREEN_TERM -c "/usr/share/$PKG/profiles/byoburc" -t shell $DEFAULT_WINDOW
|
||||||
|
else
|
||||||
|
# Select and attach to an existing session
|
||||||
|
# Update ssh-agent socket
|
||||||
|
if [ -S "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
|
||||||
|
rm -f "$RUN/$PKG.ssh-agent"
|
||||||
|
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
|
||||||
|
fi
|
||||||
|
exec byobu-select-session
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
exec screen $SCREEN_TERM -c "$HOME/.$PKG/profile" "$@"
|
exec screen $SCREEN_TERM -c "$HOME/.$PKG/profile" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/sh -e
|
|
||||||
#
|
|
||||||
# byobu-launcher
|
|
||||||
# Copyright (C) 2008 Canonical Ltd.
|
|
||||||
#
|
|
||||||
# Authors: Nick Barcet <nick.barcet@ubuntu.com>
|
|
||||||
# Dustin Kirkland <kirkland@canonical.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation, version 3 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
PKG="byobu"
|
|
||||||
RUN="/var/run/screen/S-$USER"
|
|
||||||
|
|
||||||
# Make sure that we're not already in a screen session
|
|
||||||
[ -z "$STY" ] || exit 0
|
|
||||||
[ "$TERM" = "screen-bce" ] && exit 0
|
|
||||||
|
|
||||||
out=`screen -wipe 2>/dev/null` || true
|
|
||||||
if echo "$out" | grep -qsi "^No Sockets found in "; then
|
|
||||||
# Start new session
|
|
||||||
$(which $PKG >/dev/null) && exec $PKG || exec screen
|
|
||||||
else
|
|
||||||
# Set window title
|
|
||||||
printf "\033]0;${USER}@$(hostname) - ${PKG}\007"
|
|
||||||
# Update ssh-agent socket
|
|
||||||
if [ -S "$SSH_AUTH_SOCK" ] && [ -w "$RUN" ]; then
|
|
||||||
rm -f "$RUN/$PKG.ssh-agent"
|
|
||||||
ln -sf "$SSH_AUTH_SOCK" "$RUN/$PKG.ssh-agent"
|
|
||||||
fi
|
|
||||||
exec byobu-select-session
|
|
||||||
fi
|
|
Loading…
Add table
Add a link
Reference in a new issue