MysticRyuujin / guac-install

Script for installing Guacamole on Ubuntu
976 stars 270 forks source link

Guacamole upgrade script code optimization suggestion #267

Open borross opened 7 months ago

borross commented 7 months ago

Hello! Thanks for great scripts! I want to share two mini code optimizations:

  1. Check latest version from official site (for example with using curl)
    GUACVERSION=$(curl --silent https://guacamole.apache.org/ | grep 'Latest release' | awk '{print $4}' | cut -d "/" -f 3)
  2. Current version and new version comparison after the SERVER (# Set SERVER to be the preferred download server from the Apache CDN) variable, :
    if [ $OLDVERSION = $GUACVERSION ]; then exit 0; fi

    What do you think? Offer at your discretion :)

itiligent commented 3 months ago

Its a good suggestion, but in my experience, automatically allowing the guac version to install (or upgrade to ) may introduce some new complications. This is becasue from Guac version to version, there have been other necessary changes required to the install script routines so as to support either the evolving Linux OS distros, or also to attend to various bugs that are specific to a particular Guac version and so on.

In my guacamole installer repo I check for any MySQL schema changes and then test both install and upgrade script actions before incremeting scripts to a newer version.