From 935ea00f925f070ea1da60e561275963ecaae89a Mon Sep 17 00:00:00 2001 From: Julio Gonzalez Gil Date: Sun, 20 Apr 2025 22:47:38 +0200 Subject: [PATCH 1/3] Fix bashisms, download using HTTPS --- sc3u-patcher.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sc3u-patcher.sh b/sc3u-patcher.sh index 410199d..2fdd74e 100755 --- a/sc3u-patcher.sh +++ b/sc3u-patcher.sh @@ -6,15 +6,15 @@ SC3U_PATH='/usr/local/games/SC3U' # Check for required programs RPROGRAMS="curl cat patch tar" for RPROGRAM in ${RPROGRAMS}; do - if [ "$(which ${RPROGRAM} &> /dev/null; echo ${?})" != "0" ]; then + if test "$(which ${RPROGRAM})" = ''; then echo "ERROR: Required binary ${RPROGRAM} not found. Install it to proceed" exit 1 fi done # Download sc3u patch -if [ ! -f ${PATCH_FNAME} ]; then - curl http://updates.lokigames.com/sc3u/${PATCH_FNAME} -o ${PATCH_FNAME} +if test ! -f ${PATCH_FNAME}; then + curl -L https://updates.lokigames.com/sc3u/${PATCH_FNAME} -o ${PATCH_FNAME} fi # Fix compatibility problems @@ -37,8 +37,8 @@ sudo cp sc3u ${SC3U_PATH}/sc3u sudo chmod +x ${SC3U_PATH}/sc3u # Download and install loki compat libary -if [ ! -f ${LOKI_COMPAT} ]; then - curl http://www.improbability.net/loki/${LOKI_COMPAT} -o ${LOKI_COMPAT} +if test ! -f ${LOKI_COMPAT}; then + curl -L https://www.improbability.net/loki/${LOKI_COMPAT} -o ${LOKI_COMPAT} fi sudo tar -xjf ${LOKI_COMPAT} -C ${SC3U_PATH} From 9706666c72f846eec2d116be97b4fd2b0e2a2dcb Mon Sep 17 00:00:00 2001 From: Julio Gonzalez Gil Date: Mon, 21 Apr 2025 00:26:35 +0200 Subject: [PATCH 2/3] Remove one more bashism from sc3u-patcher.sh --- sc3u-patcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc3u-patcher.sh b/sc3u-patcher.sh index 2fdd74e..6193365 100755 --- a/sc3u-patcher.sh +++ b/sc3u-patcher.sh @@ -6,7 +6,7 @@ SC3U_PATH='/usr/local/games/SC3U' # Check for required programs RPROGRAMS="curl cat patch tar" for RPROGRAM in ${RPROGRAMS}; do - if test "$(which ${RPROGRAM})" = ''; then + if test `which ${RPROGRAM}` = ''; then echo "ERROR: Required binary ${RPROGRAM} not found. Install it to proceed" exit 1 fi From 2d7f5238a4a76581a2260cb7507176f2a2e5df56 Mon Sep 17 00:00:00 2001 From: Julio Gonzalez Gil Date: Mon, 21 Apr 2025 00:26:56 +0200 Subject: [PATCH 3/3] Remove bashism from sc3u-2.0a-x86.run.patch --- sc3u-2.0a-x86.run.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc3u-2.0a-x86.run.patch b/sc3u-2.0a-x86.run.patch index affa734..533d10e 100644 --- a/sc3u-2.0a-x86.run.patch +++ b/sc3u-2.0a-x86.run.patch @@ -6,11 +6,11 @@ +skip=180 # This script was generated using Makeself 1.5.4 -CRCsum=2069455402 -+CRCsum=1151330528 ++CRCsum=838330230 MD5=00000000000000000000000000000000 label="SimCity 3000 Unlimited 2.0a Update" -script=./update.sh -+if [ `uname -m` == "x86_64" ]; then ++if test `uname -m` = 'x86_64'; then + script="linux32 ./update.sh" +else + script=./update.sh