Improve remove_launcher:

- ignore comments
 - handle prefixed "$PKG-launch" (r1658) and fix match at end of line
This commit is contained in:
Daniel Hahler 2011-09-28 13:14:56 +02:00
commit d9eaf1cedd

View file

@ -25,7 +25,8 @@ PKG="byobu"
remove_launcher() {
dest=$1
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
}