A good rule of thumb is to not take web cartoons seriously. They are intended to amuse and divert. No disrespect intended to the worthy Mr. Munroe.
Automating installations except under very specific circumstances is never a good idea. Even if you know what system it is, all sorts of things can go wrong. (A case when it is relatively reasonable is routine upgrades for Debian stable.)
Also, I would not recommend local installs, from git repositories or otherwise, unless a binary package for your distribution is unavailable. Even then, (as @case pointed out), you can try to build a package which can then be installed with the distro's package management tools. e.g. using the various debhelper tools in debian such as dh-make-perl
, python-stdeb
, dh-dry
etc. Also, these days it is not that difficult to build one's own package from scratch using with the help of tools like dh-make
.
Additionally, a script like the one shown could possibly do multiple local installs of the same package, which would make a mess.
A script such as the above would perhaps not be quite so unreasonable if it was configured to abort on a successful binary installation, but such a script would be much more complex, and would not fit neatly in a web cartoon.