usr/bin/byobu-launcher-uninstall

- usr/bin/byobu-launcher
This commit is contained in:
Dustin Kirkland 2010-06-24 09:58:09 -05:00
commit 325c5a51f8
2 changed files with 39 additions and 30 deletions

3
debian/changelog vendored
View file

@ -8,7 +8,8 @@ byobu (2.81-0ubuntu1) maverick; urgency=low
- usr/bin/byobu-status-detail - usr/bin/byobu-status-detail
- usr/bin/byobu-reconnect-sockets - usr/bin/byobu-reconnect-sockets
- usr/bin/byobu-launch, usr/bin/byobu-launcher-install, - usr/bin/byobu-launch, usr/bin/byobu-launcher-install,
usr/bin/byobu-launcher-uninstall: usr/bin/byobu-launcher-uninstall
- usr/bin/byobu-launcher
* usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help * usr/bin/byobu-config, usr/share/doc/byobu/help.txt: improve help
text, per feedback from Turnkey Linux users text, per feedback from Turnkey Linux users

View file

@ -17,12 +17,14 @@
# 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/>.
if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then if [ ! -e "$HOME/.byobu/disable-autolaunch" ]; then
if printf "$TERM" | grep -qs "screen"; then case "$TERM" in
*screen*)
# Handle nesting # Handle nesting
printf "$(gettext 'Do you want to launch byobu in a nested session?') [y/N]: " printf "$(gettext 'Do you want to launch byobu in a nested session?') [y/N]: "
answer=$(head -n1) answer=$(head -n1)
if [ "$answer" = "y" ] || [ "$answer" = "Y" ]; then case "$answer" in
y|Y)
# Prevent nasty launch recursion, if ssh'ing to localhost # Prevent nasty launch recursion, if ssh'ing to localhost
if [ -n "$SSH_CONNECTION" ]; then if [ -n "$SSH_CONNECTION" ]; then
# This is an SSH session # This is an SSH session
@ -30,24 +32,30 @@ if [ ! -r "$HOME/.byobu/disable-autolaunch" ]; then
to=$(echo "$SSH_CONNECTION" | awk '{print $3}') to=$(echo "$SSH_CONNECTION" | awk '{print $3}')
if [ "$from" = "$to" ]; then if [ "$from" = "$to" ]; then
# We have ssh'd from this machine, to this machine # We have ssh'd from this machine, to this machine
if screen -ls | grep -qs '(Attached)$'; then case "$(screen -ls)" in
# And there is already an attached screen session *\(Attached\)*)
# Exit to prevent recursion # And there is already an attached screen session, exit to prevent recursion
false false
;;
*)
exec /usr/bin/byobu "$@"
;;
esac
else else
exec /usr/bin/byobu "$@" exec /usr/bin/byobu "$@"
fi fi
else else
exec /usr/bin/byobu "$@" exec /usr/bin/byobu "$@"
fi fi
else ;;
exec /usr/bin/byobu "$@" *)
fi
else
false false
fi ;;
else esac
;;
*)
exec /usr/bin/byobu "$@" exec /usr/bin/byobu "$@"
fi ;;
esac
fi fi
false false