mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
Improve remove_launcher:
- ignore comments - handle prefixed "$PKG-launch" (r1658) and fix match at end of line
This commit is contained in:
parent
584d3c25ba
commit
d9eaf1cedd
1 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,8 @@ PKG="byobu"
|
||||||
remove_launcher() {
|
remove_launcher() {
|
||||||
dest=$1
|
dest=$1
|
||||||
if [ -w "$dest" ]; then
|
if [ -w "$dest" ]; then
|
||||||
$SED -i -e "/ $PKG-launch/d" -e "/ screen-launch/d" "$dest"
|
# print any comments, and remove lines invoking byobu:
|
||||||
|
$SED -i -e '/^\s*#/p' -e "/\b$PKG-launch\$/d" -e "/ screen-launch/d" "$dest"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue