stupid mistakes

This commit is contained in:
Nick Barcet 2008-12-18 01:05:58 +01:00
commit 2de829857a
2 changed files with 15 additions and 14 deletions

1
debian/install vendored
View file

@ -6,4 +6,5 @@ bin/updates-available usr/share/screen-profiles/bin
profiles/common usr/share/screen-profiles/profiles profiles/common usr/share/screen-profiles/profiles
profiles/debian.screenrc usr/share/screen-profiles/profiles profiles/debian.screenrc usr/share/screen-profiles/profiles
profiles/ubuntu.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 select-screen-profile usr/bin

View file

@ -12,10 +12,10 @@ if [ -e "$HOME/.screenrc-profile" ]; then
fi fi
# Ensure that ~/.screenrc-key is a symbolic link # Ensure that ~/.screenrc-key is a symbolic link
if [ -e "$HOME/.screenrc-key" ]; then if [ -e "$HOME/.screenrc-key" ]; then
>---if [ ! -L "$HOME/.screenrc-key" ]; then if [ ! -L "$HOME/.screenrc-key" ]; then
>--->---echo `gettext 'Error:'` $HOME/.screenrc-key `gettext 'exists, but is not a symlink'` echo `gettext 'Error:'` $HOME/.screenrc-key `gettext 'exists, but is not a symlink'`
>--->---exit 1 exit 1
>---fi fi
fi fi
# Prompt the user to choose among the available profiles # Prompt the user to choose among the available profiles
@ -65,16 +65,16 @@ for x in $profiles; do
cat "$HOME/.screenrc" >> "$tmp" cat "$HOME/.screenrc" >> "$tmp"
mv -f "$tmp" "$HOME/.screenrc" mv -f "$tmp" "$HOME/.screenrc"
fi fi
>--->--->---# If the user does have a .screenrc, see if it has the second # If the user does have a .screenrc, see if it has the second
>--->--->---# source line # source line
>--->--->---if ! grep -qs "source $HOME/.screenrc-key" "$HOME/.screenrc"; then if ! grep -qs "source $HOME/.screenrc-key" "$HOME/.screenrc"; then
>--->--->--->---# And if it's missing the source line, add it # And if it's missing the source line, add it
>--->--->--->---# to the top # to the top
>--->--->--->---tmp=`mktemp "$HOME/.screenrc.XXXXXX"` tmp=`mktemp "$HOME/.screenrc.XXXXXX"`
>--->--->--->---echo "source $HOME/.screenrc-key" > "$tmp" echo "source $HOME/.screenrc-key" > "$tmp"
>--->--->--->---cat "$HOME/.screenrc" >> "$tmp" cat "$HOME/.screenrc" >> "$tmp"
>--->--->--->---mv -f "$tmp" "$HOME/.screenrc" mv -f "$tmp" "$HOME/.screenrc"
>--->--->---fi fi
fi fi
rm -f "$HOME/.screenrc-profile" rm -f "$HOME/.screenrc-profile"
rm -f "$HOME/.screenrc-key" rm -f "$HOME/.screenrc-key"