I wrote something like that more than once. My use case: I am given the account on the machine on which I do not have admin access, but I still want my tools that are not installed: tmux, git, htop, latest version of vim sometimes, dos2unix, ack, etc. So I create ~/usr, and start the process of downloading and compiling tar.gz, with all the proper flags, most importantly --prefix. I automated this with bash scripts to the varying degrees of automation, but has always been wondering if there is a better and established tool for this.