void-packages/srcpkgs/vscl/files/vscl-update
Andrew Benson ca50fed74c New package: vscl-6.1.0
Closes: #12188 [via git-merge-pr]
2018-03-07 19:52:23 -08:00

24 lines
507 B
Bash
Executable file

#!/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