commit c7ab2e2d075cbc3f1e3662fd29ec713b3af27a8f
parent 14857d5b49849d2f7ba1c68fe304707e322f932f
Author: Jaromil <jaromil@dyne.org>
Date: Tue, 5 Jun 2012 07:07:36 +0200
small fixes and cosmetics on gnu systems
Diffstat:
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/build/build-gnu.sh b/build/build-gnu.sh
@@ -29,8 +29,8 @@ case $distro in
gcc -Os -static -o fetchaddr fetchaddr.o helpers.o rfc2047.o rfc822.o;
cd - > /dev/null
echo
- { test -r /usr/bin/gnome-keyring } && {
- echo "gnome-keyring"
+ if [ -r /usr/bin/gnome-keyring ]; then
+ echo "gnome-keyring" \
sudo apt-get install libglib2.0-dev
cd src/gnome-keyring
@@ -41,6 +41,7 @@ case $distro in
echo "Done compiling."
echo "Now run ./install.sh and Jaro Mail will be ready in ~/Mail"
echo "or \"./install.sh path\" to install it somewhere else."
+ fi
;;
*)
diff --git a/src/jaro b/src/jaro
@@ -290,7 +290,7 @@ ask_password() {
| $WORKDIR/bin/jaro-gnome-keyring check
if [ $? != 0 ]; then # its a new password
new_password
- { test $? = 0 } && {
+ { test $? != 0 } && {
error "Password input aborted."
return 1 }
else # password found into gnome keyring
@@ -458,8 +458,18 @@ read_account() {
for a in `find $WORKDIR/Accounts -name "$type.$account*"`; do all+=($a); done
if [ ${#all} = 0 ]; then
error "No $type account found: $account"
- error "Refine your argument using 'type.account'"
- error "For instance: imap.default or smtp.default"
+ error "Refine your argument using '-a type.account'"
+ error "For instance: jaro -a imap.default"
+ error "Available accounts (excluding symbolic links):"
+ for a in `find $WORKDIR/Accounts -type f | grep -v README`; do
+ act -n "`basename $a` :: "
+ awk '
+/^name/ { for(i=2;i<=NF;i++) printf "%s ", $i }
+/^email/ { printf "<%s>", $2 }
+/^host/ { printf " on %s", $2 }
+{next}' $a
+ echo " (`basename $a | cut -d. -f1`)"
+ done
return 1
elif [ ${#all} != 1 ]; then
error "Too many $type accounts named $account"