diff options
author | Einhard Leichtfuß <alguien@respiranto.de> | 2018-03-30 22:18:01 +0200 |
---|---|---|
committer | Einhard Leichtfuß <alguien@respiranto.de> | 2018-03-30 22:18:01 +0200 |
commit | bbc3e4cfa5c02ad3ff8dcd3b7a95e568ac434c6f (patch) | |
tree | 4672ed4584f39482bad2353f7c648a2857b84104 | |
parent | 2a7eb7221b85af3f2c5141c3918ff1959566f55a (diff) |
Do not `cd' to early
-rwxr-xr-x | update.sh | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,9 +1,6 @@ #!/bin/bash # usage: $0 dir [-u xyz-uvw|-ua|-uaf] -cd "$1" || exit 1 -shift - typeset -a langs langs=( fra-deu deu-fra @@ -50,12 +47,14 @@ prepare[deu-fra-bin]=\ function main { + [ "$#" -gt 0 ] && cd "$1" || exit 1 + shift + curl -sO http://freedict.org/freedict-database.json init handle_all src '' src "$@" handle_all bin -bin dictd "$@" - cleanup } function update |