[HowTo] Auto Updating Obsidian / SVN

Archived Source Engine and Obsidian Tutorials.
Forum rules
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1812
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

[HowTo] Auto Updating Obsidian / SVN

Postby Neico » Tue Feb 17, 2009 2:47 pm

Here we use a script to make a shared directory (You need Symbolic Links which are available on linux, or on windows since vista the server has it starting with 2008, or Junction Points on windows) and after that link it in our destination, so you only have to download the content once.

Windows:

D:\HLServer\update.bat: (where the HldsUpdateTool.exe is located)

Code: Select all

@echo off

SET UpdateTool=HldsUpdateTool.exe

TITLE Updating HLDSUpdateTool...
%UpdateTool% -command update

:: %UpdateTool% -command update -game "aliensvspredator" -dir ./aliensvspredator >> ./logs/%date%.log
:: %UpdateTool% -command update -game "americasarmy3" -dir ./americasarmy3 >> ./logs/%date%.log
:: %UpdateTool% -command update -game "brink" -dir ./brink >> ./logs/%date%.log
:: %UpdateTool% -command update -game "darkesthour" -dir ./darkesthour >> ./logs/%date%.log
:: %UpdateTool% -command update -game "darkmessiah" -dir ./darkmessiah >> ./logs/%date%.log
:: %UpdateTool% -command update -game "defencealliance2" -dir ./defencealliance2 >> ./logs/%date%.log
:: %UpdateTool% -command update -game "dinodday" -dir ./dinodday >> ./logs/%date%.log
:: %UpdateTool% -command update -game "hauntedhellsreach" -dir ./hauntedhellsreach >> ./logs/%date%.log
:: %UpdateTool% -command update -game "homefront" -dir ./homefront >> ./logs/%date%.log
:: %UpdateTool% -command update -game "homefrontjpn" -dir ./homefrontjpn >> ./logs/%date%.log
:: %UpdateTool% -command update -game "killingfloor" -dir ./killingfloor >> ./logs/%date%.log
:: %UpdateTool% -command update -game "killingfloor_beta" -dir ./killingfloor_beta >> ./logs/%date%.log
:: %UpdateTool% -command update -game "marenostrum" -dir ./marenostrum >> ./logs/%date%.log
:: %UpdateTool% -command update -game "modernwarfare3" -dir ./modernwarfare3 >> ./logs/%date%.log
:: %UpdateTool% -command update -game "mondaynightcombat" -dir ./mondaynightcombat >> ./logs/%date%.log
:: %UpdateTool% -command update -game "naturalselection2" -dir ./naturalselection2 >> ./logs/%date%.log
:: %UpdateTool% -command update -game "nexuiz" -dir ./nexuiz >> ./logs/%date%.log
:: %UpdateTool% -command update -game "nucleardawn" -dir ./nucleardawn >> ./logs/%date%.log
:: %UpdateTool% -command update -game "redorchestra" -dir ./redorchestra >> ./logs/%date%.log
:: %UpdateTool% -command update -game "redorchestra2" -dir ./redorchestra2 >> ./logs/%date%.log
:: %UpdateTool% -command update -game "serioussam3" -dir ./serioussam3 >> ./logs/%date%.log
:: %UpdateTool% -command update -game "serioussamhdse" -dir ./serioussamhdse >> ./logs/%date%.log
:: %UpdateTool% -command update -game "ship" -dir ./ship >> ./logs/%date%.log
:: %UpdateTool% -command update -game "sin" -dir ./sin >> ./logs/%date%.log
:: %UpdateTool% -command update -game "sniperelitev2" -dir ./sniperelitev2 >> ./logs/%date%.log
:: %UpdateTool% -command update -game "tshb" -dir ./tshb >> ./logs/%date%.log

TITLE Updating H Engine Content...
FOR %%A IN (cstrike czero dmc dod gearbox ricochet tfc valve) DO %UpdateTool% -command update -game %%A -dir ./hlds >> ./logs/%date%.log

TITLE Updating EP1 Engine Mod Content...
:: use episode1 as base
FOR %%A IN (dystopia esmod insurgency) DO %UpdateTool% -command update -game %%A -dir ./srcds >> ./logs/%date%.log

TITLE Updating EP2 Engine Content...
:: excluded: cssbeta tf_beta
FOR %%A IN ("Counter-Strike Source" dods hl2mp tf) DO %UpdateTool% -command update -game %%A -dir ./srcds >> ./logs/%date%.log

TITLE Updating EP2 Engine Mod Content...
:: use orangebox as base
FOR %%A IN (ageofchivalry diprip garrysmod garrysmodbeta pvkii smashball synergy zps) DO %UpdateTool% -command update -game %%A -dir ./srcds >> ./logs/%date%.log

TITLE Updating L4D Engine Content...
FOR %%A IN (l4d_full) DO %UpdateTool% -command update -game %%A -dir ./srcds >> ./logs/%date%.log

TITLE Updating L4D2 Engine Content...
:: excluded: left4dead2_demo
FOR %%A IN (left4dead2) DO %UpdateTool% -command update -game %%A -dir ./srcds >> ./logs/%date%.log

TITLE Updating AlienSwarm Engine Content...
FOR %%A IN (alienswarm) DO %UpdateTool% -command update -game %%A -dir ./srcds/alienswarm >> ./logs/%date%.log


D:\HLServer\obsidian\27015\update.bat:

Code: Select all

@echo off

SET UpdateTool=D:\HLServer\HldsUpdateTool.exe

TITLE Updating HLDSUpdateTool...
%UpdateTool% -command update

TITLE Updating Obsidian Base...
%UpdateTool% -command update -game orangebox -dir .

TITLE Updating SVN Content...
:: Use this line if you have TortoiseSVN installed
::TortoiseProc.exe /command:update /path:"%CD%\orangebox\obsidiansvn" /closeonend:2

:: Use this line if you don't have TortoiseSVN installed but the SVN command-line tool
::svn update %CD%\orangebox\obsidiansvn

TITLE Finished Updating...
PAUSE


Linux:

/home/steam/update.sh: (where ./steam is located)

Code: Select all

#!/bin/sh

UpdateTool=/home/steam/steam

SHARED=/home/steam/shared
SHARED_HLDS=$SHARED/hlds
SHARED_SRCDS=$SHARED/srcds

$UpdateTool -command update

#$UpdateTool -command update -game "aliensvspredator" -dir $SHARED/aliensvspredator
#$UpdateTool -command update -game "americasarmy3" -dir $SHARED/americasarmy3
#$UpdateTool -command update -game "brink" -dir $SHARED/brink
#$UpdateTool -command update -game "darkesthour" -dir $SHARED/darkesthour
#$UpdateTool -command update -game "darkmessiah" -dir $SHARED/darkmessiah
#$UpdateTool -command update -game "defencealliance2" -dir $SHARED/defencealliance2
#$UpdateTool -command update -game "dinodday" -dir $SHARED/dinodday
#$UpdateTool -command update -game "hauntedhellsreach" -dir $SHARED/hauntedhellsreach
#$UpdateTool -command update -game "homefront" -dir $SHARED/homefront
#$UpdateTool -command update -game "homefrontjpn" -dir $SHARED/homefrontjpn
#$UpdateTool -command update -game "killingfloor" -dir $SHARED/killingfloor
#$UpdateTool -command update -game "marenostrum" -dir $SHARED/marenostrum
#$UpdateTool -command update -game "modernwarfare3" -dir $SHARED/modernwarfare3
#$UpdateTool -command update -game "mondaynightcombat" -dir $SHARED/mondaynightcombat
#$UpdateTool -command update -game "naturalselection2" -dir $SHARED/naturalselection2
#$UpdateTool -command update -game "nexuiz" -dir $SHARED/nexuiz
#$UpdateTool -command update -game "nucleardawn" -dir $SHARED/nucleardawn
#$UpdateTool -command update -game "redorchestra" -dir $SHARED/redorchestra
#$UpdateTool -command update -game "redorchestra2" -dir $SHARED/redorchestra2
#$UpdateTool -command update -game "serioussam3" -dir $SHARED/serioussam3
#$UpdateTool -command update -game "serioussamhdse" -dir $SHARED/serioussamhdse
#$UpdateTool -command update -game "ship" -dir $SHARED/ship
#$UpdateTool -command update -game "sin" -dir $SHARED/sin
#$UpdateTool -command update -game "sniperelitev2" -dir $SHARED/sniperelitev2
#$UpdateTool -command update -game "tshb" -dir $SHARED/tshb

# HL1 Engine Content Update
for game in "cstrike" "czero" "dmc" "dod" "gearbox" "ricochet" "tfc" "valve"; do
   $UpdateTool -command update -game "$game" -dir $SHARED_HLDS
done

# EP1 Engine Mod Content Update
for game in "dystopia" "esmod" "insurgency"; do
   $UpdateTool -command update -game "$game" -dir $SHARED_SRCDS
done

# EP2 Engine Content Update
for game in "counter-strike source" "dods" "hl2mp" "tf"; do
   $UpdateTool -command update -game "$game" -dir $SHARED_SRCDS
done

# EP2 Engine Mod Content Update
for game in "ageofchivalry" "diprip" "garrysmod" "garrysmodbeta" "pvkii" "smashball" "synergy" "zps"; do
   $UpdateTool -command update -game "$game" -dir $SHARED_SRCDS
done

# L4D Engine Content Update
for game in "l4d_full"; do
   $UpdateTool -command update -game "$game" -dir $SHARED_SRCDS
done

# L4D2 Engine Content Update
for game in "left4dead2"; do
   $UpdateTool -command update -game "$game" -dir $SHARED_SRCDS
done

# AlienSwarm Engine Content Update
for game in "alienswarm"; do
   $UpdateTool -command update -game "$game" -dir $SHARED_SRCDS/alienswarm
done

chmod -R 2750 $SHARED



/home/steam/obsidian/27015/update.sh:

Code: Select all

@echo off

UpdateTool=/home/steam/steam

# HLDSUpdateTool Update
$UpdateTool -command update

# Obsidian Base Content Update
$UpdateTool -command update -game orangebox -dir .

# SVN Content Update
#svn update $PWD\orangebox\obsidiansvn

chmod -R 2750 orangebox
Last edited by Neico on Sat Jan 02, 2010 5:19 pm, edited 6 times in total.

User avatar
shiftey
npc_combinegunship
npc_combinegunship
Posts: 716
Joined: Thu Oct 09, 2008 4:45 pm
Contact:

Postby shiftey » Tue Feb 17, 2009 11:18 pm

I heard somewhere that :: instead of rem makes the script process faster because it reads rem but skips ::. idk just a random fact for ya. I doubt it matters with a small script like that.

User avatar
Neico
Lead Coder
Lead Coder
Posts: 1812
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Postby Neico » Wed Feb 18, 2009 1:04 am

:: causes problems when being used in code blocks, (never heared of that one anyways) so i'll stick with rem which is the default

User avatar
Neico
Lead Coder
Lead Coder
Posts: 1812
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Postby Neico » Mon Mar 09, 2009 3:23 pm

updated script to allow proper auto hldsupdatetool update ( cd .\ )
and added valves newest creation: HldsUpdateTool.exe -command update -game orangebox -dir .

for orangebox Mods aka C:\\HLServer\orangebox\orangebox\obsidian

PS: once the L4D Code update is released and oc is updaded, can oc go back to C:\\HLServer\orangebox\obsidian

User avatar
Vasili
npc_helicopter
npc_helicopter
Posts: 971
Joined: Wed Aug 02, 2006 8:22 pm
Location: England

Postby Vasili » Mon Mar 09, 2009 7:29 pm

OC on the L4D engine?

PEELS HEER

xigmapro
Pixel
Posts: 1
Joined: Sat Jan 02, 2010 3:22 pm

Postby xigmapro » Sat Jan 02, 2010 3:31 pm

Good example and help it new learner. :wink:

User avatar
Neico
Lead Coder
Lead Coder
Posts: 1812
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: [HowTo] Auto Updating Obsidian / SVN

Postby Neico » Mon Aug 06, 2012 3:40 pm

Updated first post with my most recent scripts (also includes linux now)

User avatar
Lucky9Two
Beta Tester
Beta Tester
Posts: 275
Joined: Sat Apr 10, 2010 8:46 am
Location: 127.0.0.1
Contact:

Re: [HowTo] Auto Updating Obsidian / SVN

Postby Lucky9Two » Tue Aug 07, 2012 4:14 am

Neico wrote:You need Symbolic Links which are available on linux, or on windows since vista the server has it starting with 2008, or Junction Points on windows


Where do I get symbolic links if I'm on server 2003?
Image
Image
^ Clickable Images ^
I'm the guy who takes the psychologically concerning selfies.

Jony09
Pixel
Posts: 1
Joined: Thu Feb 20, 2014 8:21 am

Re: [HowTo] Auto Updating Obsidian / SVN

Postby Jony09 » Thu Feb 20, 2014 8:24 am

nice