Found a small bug in this btw.  If the client-build dir is already in place for some reason (eg redeploying), the "cp -r client client-build" actually creates a client "subdirectory" inside of the already existing client-build.

Probably easiest way to fix it is by using rm -rf in the command above, instead of rm -r.
(that's a guess though, haven't yet tried it)