Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer tweaks - Prompt for camera during install #688

Merged
merged 11 commits into from
Oct 20, 2021

Conversation

linuxkidd
Copy link
Collaborator

@linuxkidd linuxkidd commented Oct 18, 2021

Add camera selection to installer, pretty-up the reboot ask.

Resolves #682
Resolves #658

Copy link
Collaborator

@EricClaeys EricClaeys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Michael,
can the prompt for camera be the first thing the script does after printing the welcome message? I'm concerned that users may not see it or may not read it if it's at the end, after all the other output lines. It can edit config.sh later but would prompt earlier.

select_camera() should first check that ${ALLSKY_CONFIG}/config.sh exists rather than asking the user if it exists.
This might require limiting select_camera() to just prompting, then add update_camera() to do the update.

If you move "source variables.sh" to the top you can dump the lines that set the colors since that's done in variables.sh.

@linuxkidd
Copy link
Collaborator Author

Keep in mind, this is a full-screen takeover that forces the user to select an option.

However, I did move the camera selection to the top of the order of operations, and check for ${ALLSKY_CONFIG}/config.sh presence, and current value. If the value is empty, it'll prompt for the correct selection. If the user exits the selection, the installer alerts them that the choice is required, then exits the installer.

Later, after the make install completes, if the camera selection was required, the installer sets the camera value.

@linuxkidd linuxkidd changed the title Installer tweaks Installer tweaks - Prompt for camera during install Oct 19, 2021
@EricClaeys EricClaeys self-requested a review October 19, 2021 03:57
Copy link
Collaborator

@EricClaeys EricClaeys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Around line 48 could you add a comment that says something like config.sh not found yet because it hasn't been installed. It will be installed later in this script.

@linuxkidd
Copy link
Collaborator Author

@EricClaeys I've added a comment in that area now that explains things a bit. Let me know if you see anything else that needs tweaking.

@EricClaeys EricClaeys self-requested a review October 20, 2021 01:57
@EricClaeys EricClaeys merged commit c479a20 into AllskyTeam:master Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants