Maybe figure out how to check extension with busybox shell (?)

This commit is contained in:
Reinhard Pointner 2016-02-11 18:55:22 +00:00
parent aca6813021
commit 6247dfdbef
1 changed files with 3 additions and 2 deletions

View File

@ -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