Update dependency script to support getting Windows deps (no bug, r=dvander).
This commit is contained in:
parent
41f74d1a5c
commit
65b32b8ced
@ -4,8 +4,17 @@
|
|||||||
trap "exit" INT
|
trap "exit" INT
|
||||||
|
|
||||||
ismac=0
|
ismac=0
|
||||||
|
iswin=0
|
||||||
|
|
||||||
|
archive_ext=tar.gz
|
||||||
|
decomp="tar zxvf"
|
||||||
|
|
||||||
if [ `uname` = "Darwin" ]; then
|
if [ `uname` = "Darwin" ]; then
|
||||||
ismac=1
|
ismac=1
|
||||||
|
elif [ `uname` != "Linux" ] && [ -n "${COMSPEC:+1}" ]; then
|
||||||
|
iswin=1
|
||||||
|
archive_ext=zip
|
||||||
|
decomp=unzip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "sourcemod-central" ]; then
|
if [ ! -d "sourcemod-central" ]; then
|
||||||
@ -17,24 +26,29 @@ fi
|
|||||||
|
|
||||||
if [ $ismac -eq 1 ]; then
|
if [ $ismac -eq 1 ]; then
|
||||||
mysqlver=mysql-5.5.28-osx10.5-x86
|
mysqlver=mysql-5.5.28-osx10.5-x86
|
||||||
mysqlurl=http://cdn.mysql.com/archives/mysql-5.5/$mysqlver.tar.gz
|
mysqlurl=http://cdn.mysql.com/archives/mysql-5.5/$mysqlver.$archive_ext
|
||||||
|
elif [ $iswin -eq 1 ]; then
|
||||||
|
mysqlver=mysql-noinstall-5.0.24a-win32
|
||||||
|
mysqlurl=http://cdn.mysql.com/archives/mysql-5.0/$mysqlver.$archive_ext
|
||||||
|
# The folder in the zip archive does not contain the substring "-noinstall", so strip it
|
||||||
|
mysqlver=${mysqlver/-noinstall}
|
||||||
else
|
else
|
||||||
mysqlver=mysql-5.6.15-linux-glibc2.5-i686
|
mysqlver=mysql-5.6.15-linux-glibc2.5-i686
|
||||||
mysqlurl=http://cdn.mysql.com/archives/mysql-5.6/$mysqlver.tar.gz
|
mysqlurl=http://cdn.mysql.com/archives/mysql-5.6/$mysqlver.$archive_ext
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "mysql-5.0" ]; then
|
if [ ! -d "mysql-5.0" ]; then
|
||||||
if [ `command -v wget` ]; then
|
if [ `command -v wget` ]; then
|
||||||
wget $mysqlurl -O mysql.tar.gz
|
wget $mysqlurl -O mysql.$archive_ext
|
||||||
elif [ `command -v curl` ]; then
|
elif [ `command -v curl` ]; then
|
||||||
curl -o mysql.tar.gz $mysqlurl
|
curl -o mysql.$archive_ext $mysqlurl
|
||||||
else
|
else
|
||||||
echo "Failed to locate wget or curl. Install one of these programs to download MySQL."
|
echo "Failed to locate wget or curl. Install one of these programs to download MySQL."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
tar zxvf mysql.tar.gz
|
$decomp mysql.$archive_ext
|
||||||
mv $mysqlver mysql-5.0
|
mv $mysqlver mysql-5.0
|
||||||
rm mysql.tar.gz
|
rm mysql.$archive_ext
|
||||||
fi
|
fi
|
||||||
|
|
||||||
checkout ()
|
checkout ()
|
||||||
@ -55,11 +69,18 @@ checkout
|
|||||||
sdks=( csgo hl2dm nd l4d2 dods l4d css tf2 insurgency 2013 )
|
sdks=( csgo hl2dm nd l4d2 dods l4d css tf2 insurgency 2013 )
|
||||||
|
|
||||||
if [ $ismac -eq 0 ]; then
|
if [ $ismac -eq 0 ]; then
|
||||||
sdks+=( ob blade )
|
# Checkout original HL2 SDK on Windows or Linux
|
||||||
|
|
||||||
name=hl2sdk
|
name=hl2sdk
|
||||||
path=hl2sdks
|
path=hl2sdks
|
||||||
checkout
|
checkout
|
||||||
|
|
||||||
|
# Add these SDKs for Windows or Linux
|
||||||
|
sdks+=( ob blade )
|
||||||
|
|
||||||
|
# Add more SDKs for Windows only
|
||||||
|
if [ $iswin -eq 1 ]; then
|
||||||
|
sdks+=( darkm swarm bgt eye dota )
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for sdk in "${sdks[@]}"
|
for sdk in "${sdks[@]}"
|
||||||
|
Loading…
Reference in New Issue
Block a user