]> git.madduck.net Git - etc/offlineimap.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

set a default account
authormartin f. krafft <madduck@madduck.net>
Fri, 23 Dec 2011 13:04:26 +0000 (14:04 +0100)
committermartin f. krafft <madduck@madduck.net>
Fri, 23 Dec 2011 13:04:26 +0000 (14:04 +0100)
.bin/offlineimap

index 7e0e8b9ceb8e5dbf8753f3f48d542bbfd47967d0..6ee4f0b8ca8ba6f9ba8042097cd3f458e4db5ee8 100755 (executable)
@@ -2,6 +2,7 @@
 set -eu
 
 VAR=$HOME/.var/offlineimap
 set -eu
 
 VAR=$HOME/.var/offlineimap
+DEFAULT_ACCOUNT=madduck.net
 
 opts=
 accounts=
 
 opts=
 accounts=
@@ -22,8 +23,7 @@ say() { [ -n "$quiet" ] || echo >&2 "$@"; }
 err() { echo >&2 "$@"; }
 
 if [ -z "$accounts" ]; then
 err() { echo >&2 "$@"; }
 
 if [ -z "$accounts" ]; then
-  err "E: no account(s) specified…"
-  exit 1
+  accounts=$DEFAULT_ACCOUNT
 else
   accounts=$(echo "$accounts" | sed -e 's/,/ /g')
 fi
 else
   accounts=$(echo "$accounts" | sed -e 's/,/ /g')
 fi