Oh my, mechevar...
I recently spent about 2 hours writing my own installer script, not seeing that you had written one.
Mine does everything yours does, except for the current version checking. (mind if I steal those lines?)
Also, I've included some code to license the software on a headless install (such as mine.)
Here is mine. (I don't want to take away from yours. But I've already put in the work, and I thought I'd share. https://www.dropbox.com/s/nc06d6swvwsf6pk/install_makemkv.sh
You still need to chmod u+x install_makemkv.sh to make it executable. and then run it.
chmod u+x install_makemkv.sh
Since there is no current version checking, you have to specify the version number, and optionally
your license key:
./install_makemkv.sh 1.8.0 "license key goes here"
If you don't enter a license key on the command line, the script will prompt you for one (which you can just hit [enter] to skip) at the end.