Browse Source

ignore games with no configs

pull/4356/head
Daniel Gibbs 2 years ago
parent
commit
1f3f7baea4
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 28
      .github/workflows/detals-check-generate-matrix.sh

28
.github/workflows/detals-check-generate-matrix.sh

@ -1,23 +1,25 @@
#!/bin/bash #!/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 "{" > "shortnamearray.json"
echo -n "\"include\":[" >> "shortnamearray.json" echo -n "\"include\":[" >> "shortnamearray.json"
while read -r line; do while read -r line; do
shortname=$(echo "$line" | awk -F, '{ print $1 }') if [ "${shortname}" != "sbots" ] && [ "${shortname}" != "inss" ]; then
export shortname shortname=$(echo "$line" | awk -F, '{ print $1 }')
servername=$(echo "$line" | awk -F, '{ print $2 }') export shortname
export servername servername=$(echo "$line" | awk -F, '{ print $2 }')
gamename=$(echo "$line" | awk -F, '{ print $3 }') export servername
export gamename gamename=$(echo "$line" | awk -F, '{ print $3 }')
distro=$(echo "$line" | awk -F, '{ print $4 }') export gamename
export distro distro=$(echo "$line" | awk -F, '{ print $4 }')
echo -n "{" >> "shortnamearray.json" export distro
echo -n "\"shortname\":" >> "shortnamearray.json" echo -n "{" >> "shortnamearray.json"
echo -n "\"${shortname}\"" >> "shortnamearray.json" echo -n "\"shortname\":" >> "shortnamearray.json"
echo -n "}," >> "shortnamearray.json" echo -n "\"${shortname}\"" >> "shortnamearray.json"
echo -n "}," >> "shortnamearray.json"
fi
done < <(tail -n +2 serverlist.csv) done < <(tail -n +2 serverlist.csv)
sed -i '$ s/.$//' "shortnamearray.json" sed -i '$ s/.$//' "shortnamearray.json"
echo -n "]" >> "shortnamearray.json" echo -n "]" >> "shortnamearray.json"

Loading…
Cancel
Save