Open anne-glerum opened 6 years ago
Just ran into an update script error again for the update_prm_files_to_2.0.0_model_settings script:
sed: 203: ./update_scripts/prm_files/update_prm_files_to_2.0.0_model_settings.sed: command i expects \ followed by text
Running on MacOS Mojave 10.14.5
can you try to edit
sed -i.tmp -f $script "$@"
to say
sed -i .tmp -f $script "$@"
? (add a space before .tmp
)
I changed the line you mentioned in update_prm_files.sh
, but get the same error. The error complains about the underlying file update_scripts/prm_files/update_prm_files_to_2.0.0_model_settings.sed
.
ah, got it. Can you please try to change
i # The parameters below this comment were created by the update script\
to
i\
# The parameters below this comment were created by the update script\
(i text
is a GNU extension that doesn't work under osx): https://www.gnu.org/software/sed/manual/sed.html#Other-Commands
mmm, there is no error any more, but there are too many end
s inserted now, see the attached diff and snapshot.
diff_resume_free_surface.txt
Sorry that I don't really have time to investigate it myself, sed is also not my strong suite.
Sorry that I don't really have time to investigate it myself, sed is also not my strong suite.
same here and I don't have access to my OSX machine right now.
@gassmoeller do you have a way to test this right now?
Will take a look later today, but I do not have access to OSX as well. @anne-glerum: Do you need the updates in the update_to_2.0 script? Or could you just remove that script and keep the later ones for 2.1 that are written in perl? I also just noticed that we merged a few other changes that will not work with the 2.0 update anymore (though that is in the update script for source files, not input files).
Sorry, took a bit longer. Have not found the error yet, but Anne can you try the following to install a GNU sed - the one provided on linux - on your Mac, and see if the scripts work afterwards? If you do not have homebrew maybe there are alternative ways to install gnu-sed on Mac. This would at least confirm that the difference is in the sed versions.
Not sure this fixes it, but I found one more GNU extension that was used in the script (see #3458), can you give the version in the PR a try?
Sorry, took a bit longer. Have not found the error yet, but Anne can you try the following to install a GNU sed - the one provided on linux - on your Mac, and see if the scripts work afterwards?
GNU sed produces a correctly updated file!
Not sure this fixes it, but I found one more GNU extension that was used in the script (see #3458), can you give the version in the PR a try?
I saw that Timo gave it a try, so I assume that's covered.
I think I found a way to test this (GNU sed has the --posix option which disables all GNU extensions), but I would need a test .prm file (all files inside ASPECT are already converted). @anne-glerum can you send me a file to test?
@anne-glerum can you send me a file to test?
Just in case you want to actually run the prm, I don't attach the ones I was actually trying to update, which have custom plugins. The same problem occurred for files that I got through:
git show tags/v1.5.0:tests/adiabatic_conditions.prm > test_update_prm.txt
test_update_prm.txt
The update_prm_files_to_2.0.0_model_settings.sed file does not update input files correctly (see fig for result) on macOS High Sierra 10.13.4.