From bbc3e4cfa5c02ad3ff8dcd3b7a95e568ac434c6f Mon Sep 17 00:00:00 2001 From: Einhard Leichtfuß Date: Fri, 30 Mar 2018 22:18:01 +0200 Subject: Do not `cd' to early --- update.sh | 7 +++---- 1 file 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 -- cgit v1.2.3