blob: df0c4127a519c3a9e42a9c0f58d2a9a1c619f4df [file] [log] [blame]
#!c:/cygwin64/bin/bash
set -e
set -x
PATH="/cygdrive/c/cygwin64/bin:$PATH"
download_file()
(
url="$1"
file="$2"
hash="$3"
hash_output="${hash} *$file"
if [ ! -f "$file" ]; then
echo "Downloading $file"
else
if [ "$(sha512sum "$file")" != "$hash_output" ]; then
echo "$file sha512sum mismatch"
fi
fi
if [ ! -f "$file" ] || [ "$(sha512sum "$file")" != "$hash_output" ]; then
rm -f "$file"
curl -L -o "$file" "$url"
fi
[ "$(sha512sum "$file")" = "$hash_output" ]
)
icu_source=icu4c-60_2-src.zip
icu_url="http://download.icu-project.org/files/icu4c/60.2/${icu_source}"
icu_hash="63232d6c15f725a60c14465b0479995b488b51288517e522abebdf5996fac7f214c424520bdbedb4c0801ea85ea7ad35de13e00512a25c1399cb827b0aca4744"
if [ "$msgloader" = "icu" ] || [ "$transcoder" = icu ]; then
cd "$AV_XERCES_CYG_DOWNLOAD"
download_file "$icu_url" "$icu_source" "$icu_hash"
fi
if [ "$msgloader" = "icu" ] || [ "$transcoder" = icu ]; then
cd "$AV_PROJECTS"
rm -rf icu
7z x "${AV_XERCES_DOWNLOAD}\\$icu_source"
fi