As a rule, I'm *very* conservative when it comes to writing scripts for third-party firmware. I'm well aware they typically lack certain utilities and features due to the limited flash. So I keep things as basic and simple as possible for maximum compatibility, be it modern ARM routers, or older MIPS routers. Of course, I can't be 100% sure every single router will work.
FWIW, I just ran it successfully (sort of) on an old ASUS WL-500gP v2 router running dd-wrt. Had to run it from /tmp since it has no JFFS either. Even so, because the firmware is running an old version of wget (no curl) that did NOT support https (only http), some of the URLs can't be downloaded because they've now been moved from http to https!
Just another example of why dealing w/ these older routers can be problematic. Even if they worked in the past, the rest of the internet has moved forward, and in this case, the blacklist providers are sometimes requiring secure connections.
Seems to me to be fully functional you'd need to install either the latest version of wget or curl from Entware.
I also tried it on the latest Merlin firmware (386.7), as-is, and it runs fine there as well (the benefit of keeping things generic I suppose). Of course, it's NOT my intention to support it on Merlin, esp. given there are alternatives like Diversion.
You can use the dd-wrt installer provided you redirect it to /tmp as I suggested either (I didn't bother compressing it).
Code:
curl -kLs bit.ly/ddwrt-installer|tr -d '\r'|sh -s -- --dir /tmp aySi7RhY
Of course, updating DNSMasq and the scheduler would be slightly different on Merlin than DD-WRT.