#!/bin/bash # Default verifies sha256 hashes # grab sources again REFRESH=1 ./refresh.source export TARBALLS=${TARBALLS:-/tmp/slackware-aarch64-virtualization/virtualization-scripts} CHECK=${CHECK:-1} REFRESH=${REFRESH:-0} for src in \ spice-protocol \ spice \ spice-gtk \ gtk-vnc \ lloyd-yajl \ libvirt \ libvirt-python \ libvirt-glib \ osinfo-db-tools \ osinfo-db \ libosinfo \ virt-manager \ libmd \ libbsd \ netcat-openbsd \ qemu ; do cd $TARBALLS/$src/ f=$(basename $(cat $TARBALLS/$src/download.info )) if [ ${CHECK} == 1 ]; then sha256sum -c $f.sha256 || exit 1 fi if [[ ${REFRESH} == 1 ]]; then [[ -e $f ]] && rm -v $f* if ! [ -e $f ]; then echo "Downloading source: $f" wget -P $TARBALLS/$src/ -i download.info || exit 1 [[ -e $f.sha256 ]] && rm $f.sha256 2>/dev/null if ! [ -e $f.sha256 ]; then sha256sum $f >> $f.sha256 echo "Added SHA256 hash: $f.sha256" fi fi fi done