Mojang / slicer

Resource pack migration tool for Minecraft 1.14
MIT License
174 stars 7 forks source link

slicer script problem on MacOS 14.2.1 #12

Open kcrca opened 7 months ago

kcrca commented 7 months ago

When I download and unzip the zip file, the syntax in bin/1.20.5 shell script has a problem with parameter substitution. Specifically, the final command build includes the line:

    printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $1_20_5_OPTS" |

/bin/sh interprets the final parameter as $1 followed by the text _20_5_OPTS. This can be fixed by telling the shell the actual bounds, as in:

    printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS ${1_20_5_OPTS}" |

It is possible that this is a problem in Apple's replacement of the Bourne shell /bin/sh with zsh, I dunno, but the replacement syntax is entirely portable shell syntax, so it seems worthwhile to fix this.