You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB

  1. --- a/usr/bin/byobu-disable-prompt.in
  2. +++ b/usr/bin/byobu-disable-prompt.in
  3. @@ -17,6 +17,8 @@
  4. # You should have received a copy of the GNU General Public License
  5. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  6. +[ -w "$HOME/.bashrc" ] || exit 1
  7. +
  8. PKG="byobu"
  9. [ -r "$HOME/.byoburc" ] && . "$HOME/.byoburc"
  10. [ -z "${BYOBU_PREFIX}" ] && export BYOBU_PREFIX="@prefix@" || export BYOBU_PREFIX
  11. --- a/usr/bin/byobu-janitor.in
  12. +++ b/usr/bin/byobu-janitor.in
  13. @@ -112,6 +112,7 @@ killall -u $USER byobu-statusd >/dev/nul
  14. rm -f "$FLAG" "/var/run/screen/S-$USER/$PKG.reload-required"
  15. # Affects: Upgrades from <= byobu 5.50, install byobu prompt if using stock bashrc
  16. +if [ -r /etc/skel/.bashrc ] && [ -r "$HOME/.bashrc" ] && [ -w "$HOME/.bashrc" ]; then
  17. if ! (grep -qs "#byobu-prompt#$" "$HOME/.bashrc") && ! [ -e "$BYOBU_CONFIG_DIR/prompt" ]; then
  18. if eval $BYOBU_TEST diff >/dev/null 2>&1; then
  19. if diff /etc/skel/.bashrc "$HOME/.bashrc" >/dev/null 2>&1; then
  20. @@ -123,6 +124,7 @@ if ! (grep -qs "#byobu-prompt#$" "$HOME/
  21. fi
  22. fi
  23. fi
  24. +fi
  25. [ -r "$BYOBU_CONFIG_DIR/prompt" ] || printf "[ -r ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc ] && . ${BYOBU_PREFIX}/share/${PKG}/profiles/bashrc #byobu-prompt#\n" > "$BYOBU_CONFIG_DIR/prompt"
  26. # Affects: Upgrades from <= byobu 5.126, clear out ec2/rcs cost statuses