mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall:
- LP: #861534 - ensure launcher command removed from each file before installing
This commit is contained in:
parent
fc9ceba7e7
commit
598d4be565
3 changed files with 18 additions and 9 deletions
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -13,6 +13,9 @@ byobu (4.43) unreleased; urgency=low
|
|||
- configure should not change files under vcs control
|
||||
- compiling users need to ensure that BYOBU_PREFIX is set in
|
||||
their environment
|
||||
* usr/bin/byobu-launcher-install, usr/bin/byobu-launcher-uninstall:
|
||||
- LP: #861534
|
||||
- ensure launcher command removed from each file before installing
|
||||
|
||||
[ Daniel Hahler ]
|
||||
* usr/bin/byobu, usr/bin/byobu-launcher-install, usr/bin/byobu-
|
||||
|
|
|
@ -42,17 +42,12 @@ update_flag() {
|
|||
}
|
||||
|
||||
install_launcher() {
|
||||
$PKG-launcher-uninstall "$1" || true
|
||||
printf "_byobu_sourced=1 . ${BYOBU_PREFIX}/bin/byobu-launch\n" >> "$1"
|
||||
}
|
||||
|
||||
# Sanitize the environment
|
||||
$PKG-launcher-uninstall || true
|
||||
# Hush login, since we will handle motd printing
|
||||
touch "$HOME"/.hushlogin
|
||||
rm -f "$BYOBU_CONFIG_DIR/disable-autolaunch"
|
||||
|
||||
# Update the logout/nologout flag
|
||||
update_flag
|
||||
|
||||
# Handle bourne shells, if not set globally in /etc/profile.d
|
||||
if [ ! -h "/etc/profile.d/Z98-$PKG.sh" ]; then
|
||||
|
@ -74,5 +69,11 @@ case "$SHELL" in
|
|||
;;
|
||||
esac
|
||||
|
||||
# Hush login, since we will handle motd printing
|
||||
touch "$HOME"/.hushlogin
|
||||
rm -f "$BYOBU_CONFIG_DIR/disable-autolaunch"
|
||||
|
||||
# Update the logout/nologout flag
|
||||
update_flag
|
||||
|
||||
# vi: syntax=sh ts=4 noexpandtab
|
||||
|
|
|
@ -30,9 +30,14 @@ remove_launcher() {
|
|||
fi
|
||||
}
|
||||
|
||||
for i in ".profile" ".bashrc" ".bash_profile" ".zprofile"; do
|
||||
remove_launcher "$HOME/$i"
|
||||
done
|
||||
if [ -f "$1" ]; then
|
||||
remove_launcher "$1"
|
||||
else
|
||||
for i in ".profile" ".bashrc" ".bash_profile" ".bash_login" ".zprofile"; do
|
||||
remove_launcher "$HOME/$i"
|
||||
done
|
||||
fi
|
||||
|
||||
mkdir -p "$BYOBU_CONFIG_DIR"
|
||||
touch "$BYOBU_CONFIG_DIR/disable-autolaunch"
|
||||
# install disabled motd printing; re-enable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue