This script is used to build the llvm-svn and lib32-llvm-svn packages that I maintain for the Arch User Repository. The script runs every 6 hours (see the included systemd service and timer) and populates the llvm-svn unofficial repo.
The code is likely crude and is not documented at all. It's released in the public domain under the CC0 license.