From a799b160834d9278735abe0fc6679bfaf2e9f695 Mon Sep 17 00:00:00 2001 From: Gary Sneed Date: Fri, 25 Oct 2024 22:43:28 -0700 Subject: POSIX compliance --- launch.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'launch.sh') diff --git a/launch.sh b/launch.sh index 596990b..1b3421b 100755 --- a/launch.sh +++ b/launch.sh @@ -56,13 +56,13 @@ VERSION_MANIFEST=$(cat "manifests/${VERSION}.json") # 1.12 and earlier, natives and regular libraries are contained in different elements. For 1.13 and later, an element may contain both. CLASSPATH= for I in $(echo "${VERSION_MANIFEST}" | jq -c .libraries.[]); do - if [[ $(echo "${I}" | jq .downloads.artifact) != 'null' ]]; then + if [ "$(echo "${I}" | jq .downloads.artifact)" != 'null' ]; then for J in ${BLACKLISTED_LIBRARIES}; do if [ ${J} == $(basename $(echo ${I} | jq -r .downloads.artifact.path)) ]; then SKIP=1 fi done - if [[ ${SKIP} -eq 1 ]]; then + if [ "${SKIP}" = '1' ]; then SKIP= continue fi @@ -71,13 +71,13 @@ for I in $(echo "${VERSION_MANIFEST}" | jq -c .libraries.[]); do CLASSPATH="${PWD}/libraries/${JAR}:${CLASSPATH}" fi fi - if [[ $(echo "${I}" | jq .natives) != 'null' ]]; then + if [ "$(echo "${I}" | jq .natives)" != 'null' ]; then for J in ${BLACKLISTED_NATIVES}; do if [ ${J} == $(basename $(echo ${I} | jq ".downloads.classifiers.\"natives-${PLATFORM}\".path")) ]; then SKIP=1 fi done - if [[ ${SKIP} -eq 1 ]]; then + if [ "${SKIP}" = '1' ]; then SKIP= continue fi @@ -94,7 +94,7 @@ done CLASSPATH="${CLASSPATH}:${PWD}/${MINECRAFT_JAR}" -if [[ $(echo "${VERSION_MANIFEST}" | jq -r .minecraftArguments) != 'null' ]]; then +if [ "$(echo "${VERSION_MANIFEST}" | jq -r .minecraftArguments)" != 'null' ]; then ARGUMENT_LIST=$(echo ${VERSION_MANIFEST} | jq -r .minecraftArguments) else for I in $(echo ${VERSION_MANIFEST} | jq -r '.arguments.game[] | select(type=="string")'); do -- cgit v1.2.3