aboutsummaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/update.sh b/update.sh
index c36b556..6f2edde 100755
--- a/update.sh
+++ b/update.sh
@@ -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