25 lines
507 B
Text
25 lines
507 B
Text
|
#!/bin/sh
|
||
|
|
||
|
AVDATURL="http://download.nai.com/products/commonupdater/"
|
||
|
|
||
|
AVDATDIR="/_datadir"
|
||
|
|
||
|
if [ ! -w "${AVDATDIR}" ]; then
|
||
|
echo "Can't write to ${AVDATDIR}"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
cd ${AVDATDIR}
|
||
|
|
||
|
filename=$(/bin/curl -sL "${AVDATURL}/avvdat.ini" | /bin/fgrep -A2 '[AVV-ZIP]' | /bin/tail -n +3 | /bin/cut -d= -f2 | /bin/tr -d '\r')
|
||
|
|
||
|
echo "Fetching $filename"
|
||
|
|
||
|
/bin/curl -Lo "${filename}" "${AVDATURL}/$filename"
|
||
|
|
||
|
/bin/unzip -o -d "${AVDATDIR}" "${filename}" "*.dat"
|
||
|
|
||
|
/bin/rm -rf ${filename}
|
||
|
|
||
|
/usr/bin/vscl --version
|