Browse Source

lgsm_version bugfix

pull/548/head
Jared Ballou 10 years ago
parent
commit
5a0d97aca6
  1. 0
      Insurgency/cfg/servers/_default.cfg
  2. 15
      Insurgency/insserver

0
Insurgency/cfg/servers/_default.cfg

15
Insurgency/insserver

@ -11,7 +11,7 @@ game="insurgency"
gamename="Insurgency" gamename="Insurgency"
#File fetching settings #File fetching settings
githubuser="jballou" githubuser="jaredballou"
githubrepo="linuxgsm" githubrepo="linuxgsm"
githubbranch="master" githubbranch="master"
@ -75,10 +75,10 @@ fn_parms(){
fn_getgithubfile() { fn_getgithubfile() {
filename=$1 filename=$1
exec=$2 exec=$2
url=${3:-$filename} fileurl=${3:-$filename}
filepath="${rootdir}/${filename}" filepath="${rootdir}/${filename}"
filedir=$(dirname "${filepath}") filedir=$(dirname "${filepath}")
download=0
# If file is missing, then download # If file is missing, then download
if [ ! -f "${filepath}" ] if [ ! -f "${filepath}" ]
then then
@ -92,16 +92,17 @@ fn_getgithubfile() {
download=1 download=1
fi fi
fi fi
if [ "$download" ] if [ $download -gt 0 ]
then then
if [ ! -d "${filedir}" ]; then if [ ! -d "${filedir}" ]; then
mkdir -p "${filedir}" mkdir -p "${filedir}"
fi fi
echo -e " fetching ${filename}...\c" url="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${fileurl}"
wget -N /dev/null "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${url}" -O "${filepath}" 2>&1 | grep -F HTTP | cut -c45- echo -e " fetching ${filename} (${url})...\c"
wget -N /dev/null "${url}" -O "${filepath}" 2>&1 | grep -F HTTP | cut -c45-
if [ "$exec" ] if [ "$exec" ]
then then
chmod +x "${functionpath}" chmod +x "${filepath}"
fi fi
fi fi
if [ "$exec" ] if [ "$exec" ]

Loading…
Cancel
Save