Skip to content

Commit

Permalink
Add -m flag to checkout-deps to avoid downloading MySQL (#1753)
Browse files Browse the repository at this point in the history
If you just want to build an extension or SourceMod core and not the MySQL extension, don't download the large MySQL library archive.
  • Loading branch information
peace-maker committed Apr 20, 2022
1 parent ff558b3 commit a7cb35c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tools/checkout-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@

trap "exit" INT

download_mysql=1

# List of HL2SDK branch names to download.
# ./checkout-deps.sh -s tf2,css
while getopts ":s:" opt; do
# Disable downloading of mysql libraries.
# ./checkout-deps.sh -m
while getopts ":s:m" opt; do
case $opt in
s) IFS=', ' read -r -a sdks <<< "$OPTARG"
;;
m) download_mysql=0
;;
\?) echo "Invalid option -$OPTARG" >&2
;;
esac
Expand Down Expand Up @@ -66,7 +72,9 @@ else
mysqlver=mysql-5.6.15-linux-glibc2.5-i686
mysqlurl=https://cdn.mysql.com/archives/mysql-5.6/$mysqlver.$archive_ext
fi
getmysql
if [ $download_mysql -eq 1 ]; then
getmysql
fi

# 64-bit MySQL
mysqlfolder=mysql-5.5-x86_64
Expand All @@ -80,7 +88,9 @@ else
mysqlver=mysql-5.6.15-linux-glibc2.5-x86_64
mysqlurl=https://cdn.mysql.com/archives/mysql-5.6/$mysqlver.$archive_ext
fi
getmysql
if [ $download_mysql -eq 1 ]; then
getmysql
fi

checkout ()
{
Expand Down

0 comments on commit a7cb35c

Please sign in to comment.