Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added install support for Metamod:Source.

  • Loading branch information...
commit 839b34006e8adf4253681b3e02d21a0864bc814e 1 parent ab5589b
Jim Brusstar authored

Showing 3 changed files with 23 additions and 6 deletions. Show diff stats Hide diff stats

  1. +1 0  README
  2. +4 0 metamod.vdf
  3. +18 6 srctool
1  README
@@ -2,5 +2,6 @@ srcds-tools
2 2 ===========
3 3
4 4 Some utilities to make your life easier managing a Source Dedicated Server.
  5 +Currently supports only Counter-Strike Source.
5 6
6 7 -jimbru
4 metamod.vdf
... ... @@ -0,0 +1,4 @@
  1 +"Plugin"
  2 +{
  3 + "file" "../cstrike/addons/metamod/bin/server"
  4 +}
24 srctool
@@ -6,17 +6,25 @@
6 6 # -jimbru
7 7
8 8 SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  9 +MMSOURCE="mmsource-1.8.7-linux.tar.gz"
9 10
10 11 action_install() {
11 12 INSTALL_PATH=$1
12 13 : ${INSTALL_PATH:="."}
13 14
14 15 SRCDS_PATH=$INSTALL_PATH/srcds
  16 + mkdir -p $SRCDS_PATH
15 17
16   - echo "Installing srcds into $SRCDS_PATH ..."
  18 + echo ">> Installing srcds into $SRCDS_PATH ..."
  19 + action_install_srcds $SRCDS_PATH
17 20
18   - mkdir -p $SRCDS_PATH
  21 + echo ">> Installing Metamod:Source ..."
  22 + action_install_mmsource $SRCDS_PATH
19 23
  24 + print_done
  25 +}
  26 +
  27 +action_install_srcds() {
20 28 echo yes | $SCRIPT_PATH/hldsupdatetool.bin > /dev/null
21 29 if [[ $? != 0 ]]
22 30 then
@@ -24,15 +32,15 @@ action_install() {
24 32 exit 1
25 33 fi
26 34
27   - mv readme.txt $SRCDS_PATH/srcds_readme.txt
28   - mv steam $SRCDS_PATH/
  35 + mv readme.txt $1/srcds_readme.txt
  36 + mv steam $1/
29 37
30 38 RETURN=1
31 39 INDEX=0
32 40 RETRY=5
33 41 while [[ $RETURN != 0 && $INDEX < $RETRY ]]
34 42 do
35   - $SRCDS_PATH/steam -command update -game "Counter-Strike Source" -dir $SRCDS_PATH
  43 + $1/steam -command update -game "Counter-Strike Source" -dir $1
36 44 RETURN=$?
37 45 ((++INDEX))
38 46 done
@@ -41,8 +49,12 @@ action_install() {
41 49 print_error "Steam failed after $RETRY retries."
42 50 exit 1
43 51 fi
  52 +}
44 53
45   - print_done
  54 +action_install_mmsource() {
  55 + tar -zxf $MMSOURCE
  56 + mv addons $1/cstrike/
  57 + cp metamod.vdf $1/cstrike/addons/
46 58 }
47 59
48 60 print_done() {

0 comments on commit 839b340

Please sign in to comment.
Something went wrong with that request. Please try again.