summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2025-03-18 03:57:26 +0100
committerFedja Beader <fedja@protonmail.ch>2025-03-18 03:57:26 +0100
commita7b52be51a7e60b749a5d376a819d2979535e60e (patch)
tree665f0bd595b86d9fc0f7c041dc95d1950ac3e932
parent315a1ee8b74b64ab808a756217155f89470a21ad (diff)
downloadclientdata-a7b52be51a7e60b749a5d376a819d2979535e60e.tar.gz
clientdata-a7b52be51a7e60b749a5d376a819d2979535e60e.tar.bz2
clientdata-a7b52be51a7e60b749a5d376a819d2979535e60e.tar.xz
clientdata-a7b52be51a7e60b749a5d376a819d2979535e60e.zip
Deduplicate further + touch up the script a tad
-rw-r--r--.gitlab-ci.yml4
-rwxr-xr-x.tools/manaplus.sh11
-rwxr-xr-x.tools/old_manaplus.sh11
3 files changed, 16 insertions, 10 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 605db3ea..bf55218b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,7 +27,7 @@ manaplus:
stage: test
image: debian:unstable
script:
- - ./.tools/manaplus.sh
+ - ./.tools/manaplus.sh manaplus master
artifacts:
paths:
- shared
@@ -38,7 +38,7 @@ old_manaplus:
stage: test
image: debian:buster
script:
- - ./.tools/old_manaplus.sh
+ - ./.tools/old_manaplus.sh packetver24 s20180215
artifacts:
paths:
- shared
diff --git a/.tools/manaplus.sh b/.tools/manaplus.sh
index ed9c29a9..d24c7f99 100755
--- a/.tools/manaplus.sh
+++ b/.tools/manaplus.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+spm_branch="$1"
+client_branch="$2"
+
source ./.tools/init.sh
clientdata_init
@@ -14,11 +17,11 @@ aptget_install \
pwd
ls
-./clientdata/.tools/downloadlib.sh manaplus manaplus master || exit 1
+./clientdata/.tools/downloadlib.sh "$spm_branch" manaplus "$client_branch" || exit 1
-export HOME=`pwd`/clientdata/shared
+export HOME="$PWD/clientdata/shared"
-cd manaplus_master || exit 1
+pushd "manaplus_$client_branch" || exit 1
export SDL_VIDEODRIVER=dummy
./bin/manaplus --version || exit 1
./bin/manaplus --validate -u -d ../clientdata || exit 1
@@ -31,4 +34,4 @@ if [ "$?" == 0 ]; then
exit 1
fi
-cd ..
+popd
diff --git a/.tools/old_manaplus.sh b/.tools/old_manaplus.sh
index d8446179..ddbcad05 100755
--- a/.tools/old_manaplus.sh
+++ b/.tools/old_manaplus.sh
@@ -1,5 +1,8 @@
#!/bin/bash
+spm_branch="$1"
+client_branch="$2"
+
source ./.tools/init.sh
clientdata_init
@@ -14,11 +17,11 @@ aptget_install \
pwd
ls
-./clientdata/.tools/downloadlib.sh packetver24 manaplus s20180215 || exit 1
+./clientdata/.tools/downloadlib.sh "$spm_branch" manaplus "$client_branch" || exit 1
-export HOME=`pwd`/clientdata/shared
+export HOME="$PWD/clientdata/shared"
-cd manaplus_s20180215 || exit 1
+pushd "manaplus_$client_branch" || exit 1
export SDL_VIDEODRIVER=dummy
./bin/manaplus --version || exit 1
./bin/manaplus --validate -u -d ../clientdata || exit 1
@@ -31,4 +34,4 @@ if [ "$?" == 0 ]; then
exit 1
fi
-cd ..
+popd.