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 script #22

Merged
merged 8 commits into from
Oct 23, 2022
Merged

Installer script #22

merged 8 commits into from
Oct 23, 2022

Conversation

ElRojo
Copy link
Owner

@ElRojo ElRojo commented Oct 22, 2022

This allows for installation / updates from the Scripts folder instead of needing to manually move files over.

@ElRojo ElRojo merged commit 82e5090 into main Oct 23, 2022
@ElRojo ElRojo deleted the installer-script branch October 23, 2022 00:22
@coded-with-claws
Copy link
Collaborator

Hi!
I was wondering whether the updater would overwrite the existing .conf file with the empty one from github?
Reading the code, it seems it would overwrite. Maybe it would be better to first test the existence of the .conf file and only download if it doesn't exist?

@ElRojo
Copy link
Owner Author

ElRojo commented Oct 25, 2022

Hi! I was wondering whether the updater would overwrite the existing .conf file with the empty one from github? Reading the code, it seems it would overwrite. Maybe it would be better to first test the existence of the .conf file and only download if it doesn't exist?

 if [ -e "/media/fat/Scripts/rfid_util" ]; then
            UTIL_DOWNLOADS=("${UTIL_DOWNLOADS[@]:1}")
            echo -e "Updating MiSTerRFID!\n"

this checks that the rfid_util dir exists (although, it used to check for a file. Now it checks for a dir. I need to change -e to -d. It still works fine, but -d is more appropriate). If that dir exists, the UTIL_DOWNLOADS array starts at index 1 and, because of that, does not run a replacement on the .conf file.

@coded-with-claws
Copy link
Collaborator

Oh, nice!! I hadn't spotted this subtility 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants