#!/bin/ksh v=$(uname -r) m=mirror.ungleich.ch cd /var/www/htdocs/pub/OpenBSD/syspatch/$v/amd64 ftp -MV https://$m/pub/OpenBSD/syspatch/$v/amd64/SHA256.sig ftp -MV https://$m/pub/OpenBSD/syspatch/$v/amd64/SHA256 for f in $(cat SHA256 | awk '{print $2}' | sed "s/(/\\ /" | sed "s/)/\\ /") do if [[ -e $f ]] then print "syspatch $f already downloaded, onto next" else print "downloading $f" ftp -MV https://$m/pub/OpenBSD/syspatch/$v/amd64/$f fi done