From 2de829857a9075f5e8bd5deab1c254194962c654 Mon Sep 17 00:00:00 2001 From: Nick Barcet Date: Thu, 18 Dec 2008 01:05:58 +0100 Subject: [PATCH] stupid mistakes --- debian/install | 1 + select-screen-profile | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/debian/install b/debian/install index a3fb179d..bb2004ca 100644 --- a/debian/install +++ b/debian/install @@ -6,4 +6,5 @@ bin/updates-available usr/share/screen-profiles/bin profiles/common usr/share/screen-profiles/profiles profiles/debian.screenrc usr/share/screen-profiles/profiles profiles/ubuntu.screenrc usr/share/screen-profiles/profiles +profiles/ubuntu.key usr/share/screen-profiles/profiles select-screen-profile usr/bin diff --git a/select-screen-profile b/select-screen-profile index f0295854..4c365724 100755 --- a/select-screen-profile +++ b/select-screen-profile @@ -12,10 +12,10 @@ if [ -e "$HOME/.screenrc-profile" ]; then fi # Ensure that ~/.screenrc-key is a symbolic link if [ -e "$HOME/.screenrc-key" ]; then - >---if [ ! -L "$HOME/.screenrc-key" ]; then - >--->---echo `gettext 'Error:'` $HOME/.screenrc-key `gettext 'exists, but is not a symlink'` - >--->---exit 1 - >---fi + if [ ! -L "$HOME/.screenrc-key" ]; then + echo `gettext 'Error:'` $HOME/.screenrc-key `gettext 'exists, but is not a symlink'` + exit 1 + fi fi # Prompt the user to choose among the available profiles @@ -65,16 +65,16 @@ for x in $profiles; do cat "$HOME/.screenrc" >> "$tmp" mv -f "$tmp" "$HOME/.screenrc" fi ->--->--->---# If the user does have a .screenrc, see if it has the second ->--->--->---# source line ->--->--->---if ! grep -qs "source $HOME/.screenrc-key" "$HOME/.screenrc"; then ->--->--->--->---# And if it's missing the source line, add it ->--->--->--->---# to the top ->--->--->--->---tmp=`mktemp "$HOME/.screenrc.XXXXXX"` ->--->--->--->---echo "source $HOME/.screenrc-key" > "$tmp" ->--->--->--->---cat "$HOME/.screenrc" >> "$tmp" ->--->--->--->---mv -f "$tmp" "$HOME/.screenrc" ->--->--->---fi + # If the user does have a .screenrc, see if it has the second + # source line + if ! grep -qs "source $HOME/.screenrc-key" "$HOME/.screenrc"; then + # And if it's missing the source line, add it + # to the top + tmp=`mktemp "$HOME/.screenrc.XXXXXX"` + echo "source $HOME/.screenrc-key" > "$tmp" + cat "$HOME/.screenrc" >> "$tmp" + mv -f "$tmp" "$HOME/.screenrc" + fi fi rm -f "$HOME/.screenrc-profile" rm -f "$HOME/.screenrc-key"