The script 404s if you don't have the correct date stamp on it.
I learned that the hard way. Don't change the date stamp to the current date. Change it to the latest build date as seen on http://opengapps.org/#downloadsection (as of this writing, it is December 25, 2017).
So instead of
TIMESTAMP="20170207"
on Line no. 25,
change that to
TIMESTAMP="20171225"
And it works.
Thanks! Using this script with KonstaKANG's Raspberry Pi 3 build of LineageOS.