With the recent change to the licensing rules for SQLcl, a simple "yum" command on your Linux box gets you up and running with SQLcl in just a few keystrokes, and for most of my VM's that is the way I roll.

However, for some environments I work with, I don't have necessary privileges to install packages and thus I revert to "old school" download of the latest zipfile. It's still easy to do - just unzip and done, but I also like to ensure that I've always got the latest and greatest version available to me.

For those environments, I whipped up a small shell script which I just throw into a nightly cron. If there is no SQLcl at all on my machine, it will grab the latest and install it for me.

image

If the latest version is already installed, then there is nothing to do:

image

but if the version on my machine is found to be out of the date, the script will grab the latest and install it, and keep a backup copy of the old version in an appropriately named folder.

image

If this is something that is useful for you, you can grab it from my git repo.

The other benefit I find from automating this is that it often helps win the battle with bureaucrats who can insist that updating any piece of software requires an 18month testing and approval cycle! All software is not the same and upgrading SQLcl should not be treated as being synonymous with (say) upgrading the OS.