From 6247dfdbefbc880cafb76882f2b972353df3800f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 11 Feb 2016 18:55:22 +0000 Subject: [PATCH] Maybe figure out how to check extension with busybox shell (?) --- build-data/build-data-import.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-data/build-data-import.sh b/build-data/build-data-import.sh index 4f45be81..a806dbf5 100755 --- a/build-data/build-data-import.sh +++ b/build-data/build-data-import.sh @@ -9,10 +9,11 @@ fetch() echo "Fetch $FILE" if [ ! -f "$FILE" ] || test "`find $FILE -mtime $TIME`"; then curl -L -o "$FILE" -z "$FILE" "$LINK" - if [[ "$FILE" == *.gz ]]; then + + if [[ "${FILE##*.}" == "gz" ]]; then gunzip -k -f "$FILE" fi - if [[ "$FILE" == *.zip ]]; then + if [[ "${FILE##*.}" == "zip" ]]; then unzip -o "$FILE" fi fi