rooklift / nibbler

Chess analysis GUI for UCI engines, with extra features for Leela (Lc0) in particular.
GNU General Public License v3.0
572 stars 71 forks source link

Resolves #184: Update Readme and add install script for Linux #202

Closed cyrillkuettel closed 2 years ago

cyrillkuettel commented 2 years ago

This script completely automates the installation for Linux users. The latest version is detected from the latest releases

Furthermore, the script will ask if you want to create a Desktop shortcut. The created shortcut looks like this:

Screenshot from 2022-08-15 23-58-27

rooklift commented 2 years ago

Hmm. It's difficult for me to accept this, because I barely speak bash and/or linux commands and it's hard for me to know that everything about this is entirely safe.

cyrillkuettel commented 2 years ago

Hmm. It's difficult for me to accept this, because I barely speak bash and/or linux commands and it's hard for me to know that everything about this is entirely safe.

Maybe you know someone who speaks bash / linux and they can verify it? Although it may seem verbose, it's mechanism is really quite simple. It just downloads the .zip and extracts it to the common location.

Edit: This Answer here describes the same exact process. In fact I copied the code from there

rooklift commented 2 years ago

If I was going to do this, I'd prefer the install.sh file was inside src. Can that be arranged?

cyrillkuettel commented 2 years ago

Sure thing. I put in in the src.

Thanks for this wonderful software!

rooklift commented 2 years ago

As you suggested, I had a Linux person look it over. They suggested that ~/Downloads might not exist and /tmp might be better. Thoughts?

teck45 commented 2 years ago

Looks good, couple of ideas. You are using sudo couple of times to create folders inside applications folder. Good idea to add echo (print for people not familiar with bash) telling that sudo is needed to make folder XX. And echo of command, then command. Example:

echo "Unzipping to $LOCATION" sudo unzip -qq ${ZIP_NAME} -d /opt/

what can be done

echo "Unzipping to $LOCATION, sudo needed" echo sudo unzip -qq ${ZIP_NAME} -d /opt/ sudo unzip -qq ${ZIP_NAME} -d /opt/

then sudo mkdir -p /usr/local/share/applications

then echo sudo mkdir -p /usr/local/share/applications sudo mkdir -p /usr/local/share/applications

Users will feel informed and this is a good thing. Also script uses pattern RookLift used for naming, some changes of this pattern will break the script. But overall base URL is based on Rooklift GitHub link, then they get version name by dropping not needed first part or last part - its safe, its based on Rooklift nibbler GitHub link.

cyrillkuettel commented 2 years ago

There were some good suggestions mentioned here. Thanks. I've implemented every idea.

One fundamental assumption: the naming convention is not subject to change: nibbler-2.3.6-linux.zip

rooklift commented 2 years ago

Alright, thanks everyone