Daniel Gibbs
2 years ago
No known key found for this signature in database
GPG Key ID: 2076B128385E8C55
1 changed files with
15 additions and
13 deletions
-
.github/workflows/detals-check-generate-matrix.sh
|
|
@ -1,11 +1,12 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv |
|
|
|
curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv |
|
|
|
|
|
|
|
echo -n "{" > "shortnamearray.json" |
|
|
|
echo -n "\"include\":[" >> "shortnamearray.json" |
|
|
|
|
|
|
|
while read -r line; do |
|
|
|
if [ "${shortname}" != "sbots" ] && [ "${shortname}" != "inss" ]; then |
|
|
|
shortname=$(echo "$line" | awk -F, '{ print $1 }') |
|
|
|
export shortname |
|
|
|
servername=$(echo "$line" | awk -F, '{ print $2 }') |
|
|
@ -18,6 +19,7 @@ while read -r line; do |
|
|
|
echo -n "\"shortname\":" >> "shortnamearray.json" |
|
|
|
echo -n "\"${shortname}\"" >> "shortnamearray.json" |
|
|
|
echo -n "}," >> "shortnamearray.json" |
|
|
|
fi |
|
|
|
done < <(tail -n +2 serverlist.csv) |
|
|
|
sed -i '$ s/.$//' "shortnamearray.json" |
|
|
|
echo -n "]" >> "shortnamearray.json" |
|
|
|