From c77b5230ab1c08382c4c8bbd56317db7a5c7f321 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 4 Feb 2009 11:19:40 +0100 Subject: [PATCH] * screen-launcher-install: no longer need the pruning code, since we just call screen-launcher-uninstall --- screen-launcher-install | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/screen-launcher-install b/screen-launcher-install index 673b56ba..ca76382f 100755 --- a/screen-launcher-install +++ b/screen-launcher-install @@ -23,23 +23,8 @@ install_screen_launcher() { dest=$1 launcher="/usr/bin/screen-launcher" launcher_line="[ -x $launcher ] && $launcher" - # We have to make sure screen is called last - pos=$(( $(grep -ns "$launcher" "$dest" | sed 's/:.*$//' | head -1) )) - do=0 - if [ $pos -gt 0 ]; then - if [ $pos -lt $(( $(wc -l "$dest" | sed "s/ .*$//") -2)) ]; then - # We have to reposition the line at the end - # First remove it - sed -i '/\/usr\/bin\/screen-launcher$/d' "$dest" - do=1 - fi - else - do=1 - fi # Add it at the end - if [ $do -eq 1 ]; then - echo "$launcher_line" >> "$dest" - fi + echo "$launcher_line" >> "$dest" } # Sanitize the environment