Want to subscribe to topics you're interested in?
Become a Member

Beta Branch revise gitenv_update routine to be smarter in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Feb 22, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    12:41 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    revise gitenv_update routine to be smarter in 123.09beta01

    - gitenv_update function is used to detect if the current github.com hosted directory changes via checking a file hosted on current github.com repository for centmin mod branch. This allows automated updates of users local git cloned /usr/local/src/centminmod directory. So in future if centmin mod official github.com repo changes name or location, I can update that file hosted on old repo and local centmin.sh menu option runs can detect the changed official centmin mod github repo name/location and automatically update /usr/local/src/centminmod locally to do a fresh git clone from the new location.
    - this update improves the gitenv_update function to be smarter in case of network connectivity failures which accidentally trigger the automatic update and local refresh of local user's /usr/local/src/centminmod directory. When network connectivity issues happen, failure to properly read the github.com hosted file, triggers refresh of local user's /usr/local/src/centminmod directory which involves removing /usr/local/src/centminmod directory and doing a fresh git clone. But in cases of network connectivity issues, the git clone fails but the local user's /usr/local/src/centminmod directory has already been removed so you end up with local user's /usr/local/src/centminmod directory being missing https://community.centminmod.com/threads/centminmod-seems-to-have-disappeared.16666/.
    - this update has a smarter check routine for this so that before removing /usr/local/src/centminmod, will move it to /usr/local/src/centminmod-automoved and then do fresh git clone creation of /usr/local/src/centminmod directory. Then check if git clone was successful before removing /usr/local/src/centminmod-automoved. If git clone fails for reasons like above, restore previous /usr/local/src/centminmod-automoved directory to /usr/local/src/centminmod.

    Continue reading...

    123.09beta01 branch