On 04.11.25 13:40, Jan Kiszka wrote: > On 04.11.25 13:33, Philippe Mathieu-Daudé wrote: >> On 4/11/25 10:26, Jan Kiszka wrote: >>> On 04.11.25 07:30, Jan Kiszka wrote: >>>> On 03.11.25 14:12, Philippe Mathieu-Daudé wrote: >>>>> Hi Jan, >>>>> >>>>> On 17/10/25 14:03, Jan Kiszka wrote: >>>>>> From: Jan Kiszka <[email protected]> >> >> >>>>>> +if [ "$bootsz" -gt $((32640 * 1024)) ]; then >>>>> >>>>> Running on macOS: >>>>> >>>>> scripts/mkemmc.sh: line 165: [: : integer expression expected >>>>> scripts/mkemmc.sh: line 169: [: : integer expression expected >>>>> scripts/mkemmc.sh: line 179: [: : integer expression expected >>>>> scripts/mkemmc.sh: line 191: [: : integer expression expected >>>>> scripts/mkemmc.sh: line 200: [: : integer expression expected >>>>> scripts/mkemmc.sh: line 202: [: : integer expression expected >>>>> scripts/mkemmc.sh: line 204: [: : integer expression expected >>>>> >>>>> $ sh --version >>>>> GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24) >>>>> >>>>> When using dash: >>>>> >>>>> scripts/mkemmc.sh: 165: [: Illegal number: >>>>> scripts/mkemmc.sh: 169: [: Illegal number: >>>>> scripts/mkemmc.sh: 179: [: Illegal number: >>>>> scripts/mkemmc.sh: 191: [: Illegal number: >>>>> scripts/mkemmc.sh: 200: [: Illegal number: >>>>> scripts/mkemmc.sh: 202: [: Illegal number: >>>>> scripts/mkemmc.sh: 204: [: Illegal number: >>>>> >>>>> Should we replace s/[/[[/? >>>> >>>> No, that would be invalid outside of bash. There must be a logical >>>> error. >>>> >>>> How did you invoke the script? What was the value of bootsz then? >>>> >>> >>> I tried with dash from debian trixie, and there is no issue like yours >>> visible. >>> >>> What problem could macOS have here? Will need your help, don't have >>> anything mac-like around right now. >> >> Don't worry, we can merge v6 code part, and add the script / doc >> during the freeze period. > > I will send out v6 then. It passed local testing, and I addressed some > further details. > > A colleague with a Mac offered to have look tomorrow on this. It is > always a pain there regarding the subtle differences... >
Linux: stat -c format mac (BSD): stat -f format Seems like "wc -c < file" could be a portable alternative to "stat -L -c %s file". Jan -- Siemens AG, Foundational Technologies Linux Expert Center
