Hello,
When trying to install my MacBook 1,1 I get this error no matter what I do.
/Volumes/NONAME/refind-install:line1397:conditionalbinaryoperatorexpected/Volumes/NONAME/refind-install:line1397:syntaxerrornear`=~'/Volumes/NO NAME/refind-install: line 1397: ` if [["$FirstCmdlineOption"=~(vmlinuz|bzImage|kernel)]] ; then'
I appreciate any help/ideas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@jovet
I'm not new to programming, but I'm not fluent in any specific programming language.
With that said, I would need more detailed instructions where to make edits in the original script.
Regards,
Paul Jurkonis
Sent from Proton Mail mobile
Regards,
Paul Jurkonis
Sent from Proton Mail mobile
-------- Original Message --------
On May 16, 2024, 8:09 AM, joevt wrote:
I haven't looked at the script, but I suspect you want to replace line 1397 with the line I provided.
Then you may wish to search for any other occurrances of =~ to see if they also need to be changed.
But before doing that, test the replacement to make sure it works with your shell version.
I'm using 10.4.11 on a PowerPC Mac but it should be the same as an Intel Mac.
Here's the output when I paste the text (I removed the tabs to be safe):
JoeG5:~joevt$echo$BASH_VERSION2.05b.0(1)-release
JoeG5:~joevt$testit(){
>ifperl-ne'exit !(/vmlinuz|bzImage|kernel/)'<<<"$FirstCmdlineOption";then
>echomatch
>else
>echonomatch
>fi
>}
JoeG5:~joevt$FirstCmdlineOption=vmlinuz;testit
match
JoeG5:~joevt$FirstCmdlineOption=bzImage;testit
match
JoeG5:~joevt$FirstCmdlineOption=kernel;testit
match
JoeG5:~joevt$FirstCmdlineOption=aaaavmlinuzaaaa;testit
match
JoeG5:~joevt$FirstCmdlineOption=aaaabzImageaaaa;testit
match
JoeG5:~joevt$FirstCmdlineOption=aaaakernelaaaaa;testit
match
JoeG5:~joevt$FirstCmdlineOption=bbbbbb;testit
nomatch
JoeG5:~joevt$
This is another method where I put the text into a file and used source to evaluate it:
JoeG5:~ joevt$ source /Users/joevt/Documents/bashtest.txt
match
match
match
match
match
match
nomatch
sh should give a similar result:
JoeG5:~ joevt$ sh /Users/joevt/Documents/bashtest.txt
Last edit: joevt 2024-05-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
When trying to install my MacBook 1,1 I get this error no matter what I do.
I appreciate any help/ideas
What OS and OS version and shell version are you using?
@joevt
Thanks for the reply
Productname: Max OS X
Productversion: 10.4.11
$SHELL /bin/bash
I think bash in Mac OS X 10.4.11 doesn't like
=~ (vmlinuz|bzImage|kernel)
You'll need a different comparison method there.
Maybe use perl?
Last edit: joevt 2024-05-16
@jovet
I'm not new to programming, but I'm not fluent in any specific programming language.
With that said, I would need more detailed instructions where to make edits in the original script.
Regards,
Paul Jurkonis
Sent from Proton Mail mobile
Regards,
Paul Jurkonis
Sent from Proton Mail mobile
-------- Original Message --------
On May 16, 2024, 8:09 AM, joevt wrote:
I haven't looked at the script, but I suspect you want to replace line 1397 with the line I provided.
Then you may wish to search for any other occurrances of
=~
to see if they also need to be changed.But before doing that, test the replacement to make sure it works with your shell version.
@joevt
this is what happens when I run in Bash and Perl
Correction: To work in Mac OS X 10.4.11 or 10.5.8, replace
-nE
with-ne
.I have no idea how you got those errors. It's a bash script that uses perl so no reason to try it in perl. Just copy and paste it into Terminal.app.
In Mac OS X 10.4.11,
perl -v
says I havev5.8.6
@joevt
I made the change,
-nE
to-ne
.I ran it through bash
this is the error;
Maybe you can show me how you are running it through bash.
In my tests, I just copy and paste the text into a Terminal.app window.
Yes, that's exactly what I do.
Copy and paste then press enter to execute.
Regards,
Paul Jurkonis
Sent from Proton Mail mobile
-------- Original Message --------
On May 19, 2024, 7:58 PM, joevt wrote:
I'm using 10.4.11 on a PowerPC Mac but it should be the same as an Intel Mac.
Here's the output when I paste the text (I removed the tabs to be safe):
This is another method where I put the text into a file and used
source
to evaluate it:sh
should give a similar result:Last edit: joevt 2024-05-20