MiSTer updater script

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

Locked
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MiSTer updater script

Post by Sorgelig »

i found the bug.
I was hidden bug which was present since the beginning.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

Sorgelig wrote:i found the bug.
I was hidden bug which was present since the beginning.
Great Sorgelig :cheers:

Thank you.
Regards.

Locutus73
LeKrang
Atarian
Atarian
Posts: 9
Joined: Mon Nov 12, 2018 4:08 am

Re: MiSTer updater script

Post by LeKrang »

I just tried the updater again and you were right, the boot1.rom file is still there.
I must have messed something up on my end.

Sorry for jumping to quick conclusions.
SnoopKatt
Atarian
Atarian
Posts: 5
Joined: Thu Oct 11, 2018 5:41 am

Re: MiSTer updater script

Post by SnoopKatt »

Locutus73 wrote:
ewok wrote:Is it possible to automaticly update the script too? This script changed my life too. Now if only.....

Thanks for all the great work!
Make a little update.sh script like this:

Code: Select all

#!/bin/bash

curl -ksLf https://github.com/MiSTer-devel/Updater_script_MiSTer/blob/master/mister_updater.sh?raw=true | bash -
And it will always execute the latest mister_updater.sh from GitHub with default settings.

Regards.

Locutus73
I tried this, but it still ended up resolving as an html page, even with the raw=true part in.

I got this working by doing:

Code: Select all

#!/bin/bash

curl -ksLf https://raw.githubusercontent.com/MiSTer-devel/Updater_script_MiSTer/master/mister_updater.sh | bash -
ovalfastlx
Atariator
Atariator
Posts: 19
Joined: Sat Nov 03, 2018 3:13 am

Re: MiSTer updater script

Post by ovalfastlx »

I noticed the newest Mister Main is downloaded with the updater but it doesn't replace the old one. It needs to be renamed without the date. Is this something that needs to be enabled in the script? I have the script running and does uodaye everything else. Thanks guys.
esmith13
Atari User
Atari User
Posts: 32
Joined: Tue Oct 30, 2018 8:06 pm
Contact:

Re: MiSTer updater script

Post by esmith13 »

The script keeps not only the updated version with the correct name but also a second copy with the date code still intact.

Did you press f12 on the main screen and verify your active version number?
ovalfastlx
Atariator
Atariator
Posts: 19
Joined: Sat Nov 03, 2018 3:13 am

Re: MiSTer updater script

Post by ovalfastlx »

esmith13 wrote:The script keeps not only the updated version with the correct name but also a second copy with the date code still intact.

Did you press f12 on the main screen and verify your active version number?
I checked version with F12 it still says 20181229 version. I know there's a 20181231 version.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

ovalfastlx wrote:
esmith13 wrote:The script keeps not only the updated version with the correct name but also a second copy with the date code still intact.

Did you press f12 on the main screen and verify your active version number?
I checked version with F12 it still says 20181229 version. I know there's a 20181231 version.
Strange, the replacement is done by this bit of code

Code: Select all

					if [ $BASE_FILE_NAME == "MiSTer" ] || [ $BASE_FILE_NAME == "menu" ]
					then
						DESTINATION_FILE=$(echo "$MAX_RELEASE_URL" | sed 's/.*\///g' | sed 's/_[0-9]\{8\}[a-zA-Z]\{0,1\}//g')
						echo "Copying $DESTINATION_FILE"
						rm "$CURRENT_DIR/$DESTINATION_FILE" > /dev/null 2>&1
						cp "$CURRENT_DIR/$FILE_NAME" "$CURRENT_DIR/$DESTINATION_FILE"
						REBOOT_NEEDED=true
					fi
Did your MiSTer reboot after updating main MiSTer or menu rbf?
Try deleting MiSTer_yyyymmdd and menu_yyyymmdd.rbf and update again.

Regards.

Locutus73
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

SnoopKatt wrote:
Locutus73 wrote:
ewok wrote:Is it possible to automaticly update the script too? This script changed my life too. Now if only.....

Thanks for all the great work!
Make a little update.sh script like this:

Code: Select all

#!/bin/bash

curl -ksLf https://github.com/MiSTer-devel/Updater_script_MiSTer/blob/master/mister_updater.sh?raw=true | bash -
And it will always execute the latest mister_updater.sh from GitHub with default settings.

Regards.

Locutus73
I tried this, but it still ended up resolving as an html page, even with the raw=true part in.

I got this working by doing:

Code: Select all

#!/bin/bash

curl -ksLf https://raw.githubusercontent.com/MiSTer-devel/Updater_script_MiSTer/master/mister_updater.sh | bash -
Strange,
https://github.com/MiSTer-devel/Updater ... h?raw=true
redirects to
https://raw.githubusercontent.com/MiSTe ... updater.sh
you can try clicking the links.
I use that script myself, did you use the -ksLf options in the curl command?

Regards.

Locutus73
SnoopKatt
Atarian
Atarian
Posts: 5
Joined: Thu Oct 11, 2018 5:41 am

Re: MiSTer updater script

Post by SnoopKatt »

Locutus73 wrote: Strange,
https://github.com/MiSTer-devel/Updater ... h?raw=true
redirects to
https://raw.githubusercontent.com/MiSTe ... updater.sh
you can try clicking the links.
I use that script myself, did you use the -ksLf options in the curl command?

Regards.

Locutus73
It redirects to it in the web browser, but it didn't when I tried it on my MiSTer. I used those options as well. Are there any other customizations that you have on the Linux OS?

Either way, thank you for making the script! It's very helpful given how fast this project moves (which is a great thing!).
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

SnoopKatt wrote:It redirects to it in the web browser, but it didn't when I tried it on my MiSTer. I used those options as well. Are there any other customizations that you have on the Linux OS?

Either way, thank you for making the script! It's very helpful given how fast this project moves (which is a great thing!).
And that’s is very interesting because I use the
https://github.com/MiSTer-devel/Updater ... h?raw=true
in my short update script myself and, if you look at the mister_updater.sh code, it uses the ?raw=true URLs everywhere for downloading cores and stuff.
If they didn’t work, the entire updater wouldn’t work.
Can you doublecheck please?

Thank you in advance.
Best regards.

Locutus73
ovalfastlx
Atariator
Atariator
Posts: 19
Joined: Sat Nov 03, 2018 3:13 am

Re: MiSTer updater script

Post by ovalfastlx »

Locutus73 wrote:
ovalfastlx wrote:
esmith13 wrote:The script keeps not only the updated version with the correct name but also a second copy with the date code still intact.

Did you press f12 on the main screen and verify your active version number?
I checked version with F12 it still says 20181229 version. I know there's a 20181231 version.
Strange, the replacement is done by this bit of code

Code: Select all

					if [ $BASE_FILE_NAME == "MiSTer" ] || [ $BASE_FILE_NAME == "menu" ]
					then
						DESTINATION_FILE=$(echo "$MAX_RELEASE_URL" | sed 's/.*\///g' | sed 's/_[0-9]\{8\}[a-zA-Z]\{0,1\}//g')
						echo "Copying $DESTINATION_FILE"
						rm "$CURRENT_DIR/$DESTINATION_FILE" > /dev/null 2>&1
						cp "$CURRENT_DIR/$FILE_NAME" "$CURRENT_DIR/$DESTINATION_FILE"
						REBOOT_NEEDED=true
					fi
Did your MiSTer reboot after updating main MiSTer or menu rbf?
Try deleting MiSTer_yyyymmdd and menu_yyyymmdd.rbf and update again.

Regards.

Locutus73

So it updated with download new cores set to "true". I had this set to false because I only wanted to update what was on the card already, which worked on the cores but not the Main or Menu.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

ovalfastlx wrote:So it updated with download new cores set to "true". I had this set to false because I only wanted to update what was on the card already, which worked on the cores but not the Main or Menu.
Got it, tomorrow I will check for this combination: download new cores set to false and old main MiSTer and/or menu.rbf and I will let you know.

Thank you.
Regards.

Locutus73
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

ovalfastlx wrote:So it updated with download new cores set to "true". I had this set to false because I only wanted to update what was on the card already, which worked on the cores but not the Main or Menu.
Ok, got it, it’s at the same time an intended and unintended behaviour: the script considers a core as installed only if it finds a timestamped (i.e. core_yyyymmdd.rbf) file. When you first ran the script with DOWNLOAD_NEW_CORES=false it didn’t find the MiSTer_yyyymmdd and the menu_yyyymmdd.rbf file, so it considered them new/uninstalled cores and didn’t download them (because you want to update only installed cores). But truth is MiSTer and menu.rbf are always installed, even if there are no timestamped files, so the script must treat them always as preinstalled files.
Good catch! I’ll fix it ASAP.

Regards.
Locutus73
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

Hi, new mister_updater.sh script:
Version 1.6.2 - 2019.01.02 - Solved a bug that prevented updating MiSTer main executable, menu.rbf and Linux system when DOWNLOAD_NEW_CORES="false" and timestamped files were missing; improved REPOSITORIES_FILTER comments; code clean up by frederic-mahe (thank you very much).

https://github.com/MiSTer-devel/Updater_script_MiSTer

Regards.

Locutus73
jayp76
Atari freak
Atari freak
Posts: 64
Joined: Wed Oct 17, 2018 10:09 am

Re: MiSTer updater script

Post by jayp76 »

@Locutus73
I wanted to try thhe update.sh script, but it errors with bad interpreter. I am a bit confused since bash is available.
Do you know what causes this?

Found the culprit. It's working now. Notepad++ inserted some crap at the end.

Best regards
jay
ovalfastlx
Atariator
Atariator
Posts: 19
Joined: Sat Nov 03, 2018 3:13 am

Re: MiSTer updater script

Post by ovalfastlx »

Locutus73 wrote:Hi, new mister_updater.sh script:
Version 1.6.2 - 2019.01.02 - Solved a bug that prevented updating MiSTer main executable, menu.rbf and Linux system when DOWNLOAD_NEW_CORES="false" and timestamped files were missing; improved REPOSITORIES_FILTER comments; code clean up by frederic-mahe (thank you very much).

https://github.com/MiSTer-devel/Updater_script_MiSTer

Regards.

Locutus73
Just tried out the update and it worked perfectly. Thanks
SnoopKatt
Atarian
Atarian
Posts: 5
Joined: Thu Oct 11, 2018 5:41 am

Re: MiSTer updater script

Post by SnoopKatt »

Locutus73 wrote:
SnoopKatt wrote:It redirects to it in the web browser, but it didn't when I tried it on my MiSTer. I used those options as well. Are there any other customizations that you have on the Linux OS?

Either way, thank you for making the script! It's very helpful given how fast this project moves (which is a great thing!).
And that’s is very interesting because I use the
https://github.com/MiSTer-devel/Updater ... h?raw=true
in my short update script myself and, if you look at the mister_updater.sh code, it uses the ?raw=true URLs everywhere for downloading cores and stuff.
If they didn’t work, the entire updater wouldn’t work.
Can you doublecheck please?

Thank you in advance.
Best regards.

Locutus73
I just gave it another whirl and it's working now. Not sure what I did wrong, but I definitely did something incorrectly haha. Thanks!
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

New mister_updater.sh:
Version 1.7 - 2019-01-07 - Added support for an ini configuration file with the same name as the original script, i.e. mister_updater.ini or update.ini; added CIFS_MiSTer and Scripts_MiSTer additional repositories; improved additional repositories handling; added optional advanced NTP_SERVER option for syncing system date and time with a NTP server.

Now the simple update.sh which loads mister_updater.sh in memory from GitHub and executes it is officially released in the repository; it uses update.ini for the updater settings.

Tl;Dr: download https://github.com/MiSTer-devel/Updater ... h?raw=true and enjoy all the new scripts; you can customize it with an update.ini file; you can customize mount_cifs.sh with mount_cifs.ini. From now onwards all customizable scripts will have an ini file so, when updated, custom options will be preserved.

Regards.

Locutus73
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

Can anyone tell me if the updater readme is clear enough and if/where it can be improved (including bad grammar and typos)?
https://github.com/MiSTer-devel/Updater_script_MiSTer

Thank you in advance.
Regards.

Locutus73
MattE888
Atari freak
Atari freak
Posts: 51
Joined: Fri Nov 02, 2018 5:34 pm

Re: MiSTer updater script

Post by MattE888 »

Locutus73 wrote:Can anyone tell me if the updater readme is clear enough and if/where it can be improved (including bad grammar and typos)?
https://github.com/MiSTer-devel/Updater_script_MiSTer

Thank you in advance.
Regards.

Locutus73
"It will always use the latest mister_updater.sh (where the real update code is) form GitHub"

That form should be "from" I think???

Thanks for your amazing updater script!!!
SegaMan
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 102
Joined: Sat Oct 27, 2018 12:59 pm

Re: MiSTer updater script

Post by SegaMan »

I am not sure how the .ini file should look like and where the file must be on SD Card (me=noob) ;)
esmith13
Atari User
Atari User
Posts: 32
Joined: Tue Oct 30, 2018 8:06 pm
Contact:

Re: MiSTer updater script

Post by esmith13 »

SegaMan wrote:I am not sure how the .ini file should look like and where the file must be on SD Card (me=noob) ;)
Agreed.

Would love a sample .ini to be on GitHub with all the options listed even if commented out.
Locutus73
Atari Super Hero
Atari Super Hero
Posts: 579
Joined: Wed Feb 07, 2018 6:13 pm

Re: MiSTer updater script

Post by Locutus73 »

SegaMan wrote:I am not sure how the .ini file should look like and where the file must be on SD Card (me=noob) ;)
esmith13 wrote: Agreed.

Would love a sample .ini to be on GitHub with all the options listed even if commented out.
The code snippets you see in the readme are actually what an .ini should look like, they are real examples, you can copy and paste them in an empty text file and name it update.ini.
The readme states You can make an update.ini (same name as the script and placed in the same directory), so it says where the file must be placed.
If you click on the link in the see mister_updater.sh USER OPTIONS section for all user options and their detailed explanations you can see all the user options with the descriptions.

All the infos you requested were there, can you help me to make them more visible/understandable/whatever?

Thank you in advance.
Best regards.

Locutus73
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MiSTer updater script

Post by Sorgelig »

MiSTer.ini is on github since beginning:
https://github.com/MiSTer-devel/Main_Mi ... MiSTer.ini
Locked

Return to “MiSTer”