#!/bin/sh

[ ! -d "Elections" ] && mkdir Elections
[ ! -d "Elections/js" ] && mkdir Elections/js
###fetch -o ctymain.htm "https://elections.sos.ga.gov/Elections/countyelectionoffices.do"

grep "<script src=" ctymain.htm |
cut -d "/" -f 2- |
cut -d "\"" -f 1 |
while read uri
do
url="https://elections.sos.ga.gov/${uri}"; export url
echo "fetch -o ${uri} \"${url}\""
fetch -o ${uri} "${url}"
done
