mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-08 12:07:37 +08:00
fix: revert urls to correct data dir
This commit is contained in:
parent
56e422be45
commit
72bb39ec04
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/${datadir}/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"
|
||||
|
@ -198,7 +198,7 @@ fn_alert_info() {
|
||||
}
|
||||
|
||||
# Images
|
||||
alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/gameicons/${shortname}-icon.png"
|
||||
alerticon="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/gameicons/${shortname}-icon.png"
|
||||
|
||||
if [ "${alert}" == "permissions" ]; then
|
||||
fn_alert_permissions
|
||||
|
@ -11,14 +11,14 @@ jsoninfo=$(
|
||||
cat << EOF
|
||||
{
|
||||
"username": "LinuxGSM",
|
||||
"avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"file": "content",
|
||||
"embeds": [
|
||||
{
|
||||
"author": {
|
||||
"name": "LinuxGSM Alert",
|
||||
"url": "",
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg"
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg"
|
||||
},
|
||||
"title": "${alerttitle}",
|
||||
"url": "",
|
||||
@ -64,7 +64,7 @@ jsoninfo=$(
|
||||
}
|
||||
],
|
||||
"footer": {
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"text": "Sent by LinuxGSM ${version}"
|
||||
}
|
||||
}
|
||||
@ -77,14 +77,14 @@ jsonnoinfo=$(
|
||||
cat << EOF
|
||||
{
|
||||
"username": "LinuxGSM",
|
||||
"avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"avatar_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"file": "content",
|
||||
"embeds": [
|
||||
{
|
||||
"author": {
|
||||
"name": "LinuxGSM Alert",
|
||||
"url": "",
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg"
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg"
|
||||
},
|
||||
"title": "${alerttitle}",
|
||||
"url": "",
|
||||
@ -125,7 +125,7 @@ jsonnoinfo=$(
|
||||
}
|
||||
],
|
||||
"footer": {
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"icon_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"text": "Sent by LinuxGSM ${version}"
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ jsoninfo=$(
|
||||
"color": "${alertcolourhex}",
|
||||
"author_name": "LinuxGSM Alert",
|
||||
"author_link": "https://linuxgsm.com",
|
||||
"author_icon": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"author_icon": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"thumb_url": "${alerticon}",
|
||||
"text": "",
|
||||
"fields": [
|
||||
@ -75,7 +75,7 @@ jsonnoinfo=$(
|
||||
"color": "${alertcolourhex}",
|
||||
"author_name": "LinuxGSM Alert",
|
||||
"author_link": "https://linuxgsm.com",
|
||||
"author_icon": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"author_icon": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"thumb_url": "${alerticon}",
|
||||
"text": "",
|
||||
"fields": [
|
||||
|
@ -70,7 +70,7 @@ jsonnoinfo=$(
|
||||
"elements": [
|
||||
{
|
||||
"type": "image",
|
||||
"image_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"image_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"alt_text": "LinuxGSM icon"
|
||||
},
|
||||
{
|
||||
@ -157,7 +157,7 @@ jsoninfo=$(
|
||||
"elements": [
|
||||
{
|
||||
"type": "image",
|
||||
"image_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/alert_discord_logo.jpg",
|
||||
"image_url": "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/alert_discord_logo.jpg",
|
||||
"alt_text": "LinuxGSM icon"
|
||||
},
|
||||
{
|
||||
|
@ -358,9 +358,9 @@ info_distro.sh
|
||||
|
||||
if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
|
||||
# Check that the distro dependency csv file exists.
|
||||
fn_check_file_github "${datadir}" "${distroid}-${distroversioncsv}.csv"
|
||||
fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv"
|
||||
if [ -n "${checkflag}" ] && [ "${checkflag}" == "0" ]; then
|
||||
fn_fetch_file_github "${datadir}" "${distroid}-${distroversioncsv}.csv" "${datadir}" "chmodx" "norun" "noforce" "nohash"
|
||||
fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "${datadir}" "chmodx" "norun" "noforce" "nohash"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -160,9 +160,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
|
||||
echo -en "checking ${remotereponame} config ${distroid}-${distroversioncsv}.csv...\c"
|
||||
fn_script_log_info "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv"
|
||||
if [ "${remotereponame}" == "GitHub" ]; then
|
||||
curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
||||
curl ${nocache} --connect-timeout 3 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
||||
else
|
||||
curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${datadir}/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
||||
curl ${nocache} --connect-timeout 3 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv" 1> /dev/null
|
||||
fi
|
||||
if [ $? != "0" ]; then
|
||||
fn_print_fail_eol_nl
|
||||
@ -172,9 +172,9 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
|
||||
fi
|
||||
|
||||
if [ "${remotereponame}" == "GitHub" ]; then
|
||||
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${datadir}/${distroid}-${distroversioncsv}.csv"))
|
||||
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
|
||||
else
|
||||
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${datadir}/${distroid}-${distroversioncsv}.csv"))
|
||||
config_file_diff=$(diff "${datadir}/${distroid}-${distroversioncsv}.csv" <(curl ${nocache} --connect-timeout 3 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/lgsm/data/${distroid}-${distroversioncsv}.csv"))
|
||||
fi
|
||||
|
||||
if [ "${config_file_diff}" != "" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user