From c86b19813bae2fa3ccfc27ce97b1a450052e9388 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 5 Aug 2013 08:54:22 +0100 Subject: [PATCH] * usr/bin/byobu-janitor: - ensure byobu can be purged without breaking a bashrc --- debian/changelog | 3 ++- usr/bin/byobu-janitor | 2 +- usr/share/man/man1/byobu-enable-prompt.1 | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index b33c292d..05346455 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ byobu (5.52) unreleased; urgency=low - * UNRELEASED + * usr/bin/byobu-janitor: + - ensure byobu can be purged without breaking a bashrc -- Dustin Kirkland Mon, 05 Aug 2013 08:38:30 +0100 diff --git a/usr/bin/byobu-janitor b/usr/bin/byobu-janitor index f865134d..9a2a8064 100755 --- a/usr/bin/byobu-janitor +++ b/usr/bin/byobu-janitor @@ -117,6 +117,6 @@ rm -f "$FLAG" "/var/run/screen/S-$USER/$PKG.reload-required" if ! (grep -qs "#byobu-prompt#$" "$HOME/.bashrc") && ! [ -e "$BYOBU_CONFIG_DIR/prompt" ]; then printf "[ -r $BYOBU_CONFIG_DIR/prompt ] && . $BYOBU_CONFIG_DIR/prompt #byobu-prompt#\n" >> "$HOME/.bashrc" fi -[ -r "$BYOBU_CONFIG_DIR/prompt" ] || echo ". ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc #byobu-prompt#\n" > "$BYOBU_CONFIG_DIR/prompt" +[ -r "$BYOBU_CONFIG_DIR/prompt" ] || echo "[ -r ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc ] && . ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc #byobu-prompt#\n" > "$BYOBU_CONFIG_DIR/prompt" # vi: syntax=sh ts=4 noexpandtab diff --git a/usr/share/man/man1/byobu-enable-prompt.1 b/usr/share/man/man1/byobu-enable-prompt.1 index 0a0b6c4e..2c5f2fb8 100644 --- a/usr/share/man/man1/byobu-enable-prompt.1 +++ b/usr/share/man/man1/byobu-enable-prompt.1 @@ -10,6 +10,8 @@ byobu-enable-prompt, byobu-disable-prompt \- add and remove a nice color prompt .SH DESCRIPTION \fBbyobu-enable-prompt\fP will add one line to your \fI~/.bashrc\fP. +You can safely remove the line from your \fI~/.bashrc\fP, which ends in \fB#byobu-prompt\fP. + \fBbyobu-disable-prompt\fP will remove its color configuration from \fI~/.bashrc\fP. .SH "BUGS"