gonzalo / gphoto2-updater

Gphoto2 compiler and installer script. This script was initially created for Raspbian and Raspberry Pi but it is also tested for Ubuntu and Debian Jessie & Wheezy.
http://github.com/gonzalo/gphoto2-updater
292 stars 71 forks source link

LATEST_STABLE_LIBGPHOTO_VERSION undefined #86

Open thomaschaaf opened 2 years ago

thomaschaaf commented 2 years ago

This commit breaks the install script as the environment variables are not inlined anymore.

https://github.com/gonzalo/gphoto2-updater/commit/fdb92a9d73e80a0513f1aaccb6095998afa22b0f#diff-630205c4a3115755dbcd9f6e32c96b42fbff83adb31fc2926b8f7198ffc90d28L34

gonzalo commented 2 years ago

Thanks for reporting, I've extended the readme.md command to also download .env file. This is necessary if we want to keep configuration centralized in one file. Probably we could think about a better way to manage this, but currently is necessary for testing. Best option maybe is getting directly the latest stable release version from gphoto2 github repository with some git command. I will explore that option.

scribblemaniac commented 2 years ago

This was intentional for the reason already described, although I see now there were a couple issues with it. You will need to download the .env file along with the script (I was imagining installation being done by cloning the git repository), and additionally you will need to execute the script with the .env file in the current working directory.

I agree that checking for the latest stable release rather than having a hardcoded version would be better and should be possible. When installing that can probably be done relatively easily with git based on the tags. To show that version before the user selects an option there are a few choices:

P.S. @gonzalo In the new instructions, you are missing "wget" before the second url.

gonzalo commented 2 years ago

You're right @scribblemaniac , I fixed the wget command in the last commit.

I've found a simple script that can provide the latest version tag: curl --silent "https://api.github.com/repos/gphoto/libgphoto2/releases/latest" | grep '"tag_name":' | sed -E 's/."([^"]+)"./\1/'

I will explore how to integrate it to get always the last stable release both for testing environment and running script