Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added install support for Metamod:Source.

  • Loading branch information...
commit 839b34006e8adf4253681b3e02d21a0864bc814e 1 parent ab5589b
Jim Brusstar authored
Showing with 23 additions and 6 deletions.
  1. +1 −0  README
  2. +4 −0 metamod.vdf
  3. +18 −6 srctool
1  README
View
@@ -2,5 +2,6 @@ srcds-tools
===========
Some utilities to make your life easier managing a Source Dedicated Server.
+Currently supports only Counter-Strike Source.
-jimbru
4 metamod.vdf
View
@@ -0,0 +1,4 @@
+"Plugin"
+{
+ "file" "../cstrike/addons/metamod/bin/server"
+}
24 srctool
View
@@ -6,17 +6,25 @@
# -jimbru
SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+MMSOURCE="mmsource-1.8.7-linux.tar.gz"
action_install() {
INSTALL_PATH=$1
: ${INSTALL_PATH:="."}
SRCDS_PATH=$INSTALL_PATH/srcds
+ mkdir -p $SRCDS_PATH
- echo "Installing srcds into $SRCDS_PATH ..."
+ echo ">> Installing srcds into $SRCDS_PATH ..."
+ action_install_srcds $SRCDS_PATH
- mkdir -p $SRCDS_PATH
+ echo ">> Installing Metamod:Source ..."
+ action_install_mmsource $SRCDS_PATH
+ print_done
+}
+
+action_install_srcds() {
echo yes | $SCRIPT_PATH/hldsupdatetool.bin > /dev/null
if [[ $? != 0 ]]
then
@@ -24,15 +32,15 @@ action_install() {
exit 1
fi
- mv readme.txt $SRCDS_PATH/srcds_readme.txt
- mv steam $SRCDS_PATH/
+ mv readme.txt $1/srcds_readme.txt
+ mv steam $1/
RETURN=1
INDEX=0
RETRY=5
while [[ $RETURN != 0 && $INDEX < $RETRY ]]
do
- $SRCDS_PATH/steam -command update -game "Counter-Strike Source" -dir $SRCDS_PATH
+ $1/steam -command update -game "Counter-Strike Source" -dir $1
RETURN=$?
((++INDEX))
done
@@ -41,8 +49,12 @@ action_install() {
print_error "Steam failed after $RETRY retries."
exit 1
fi
+}
- print_done
+action_install_mmsource() {
+ tar -zxf $MMSOURCE
+ mv addons $1/cstrike/
+ cp metamod.vdf $1/cstrike/addons/
}
print_done() {
Please sign in to comment.
Something went wrong with that request. Please try again.