[HowTo] Auto Updating Obsidian / SVN

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

[HowTo] Auto Updating Obsidian / SVN

Post by Neico »

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 4:19 pm, edited 6 times in total.
Image
shiftey
npc_combinegunship
npc_combinegunship
Posts: 705
Joined: Thu Oct 09, 2008 4:45 pm
Contact:

Post by shiftey »

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: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Post by Neico »

:: causes problems when being used in code blocks, (never heared of that one anyways) so i'll stick with rem which is the default
Image
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Post by Neico »

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
Image
User avatar
Vasili
npc_helicopter
npc_helicopter
Posts: 901
Joined: Wed Aug 02, 2006 8:22 pm
Location: England

Post by Vasili »

OC on the L4D engine?

PEELS HEER
xigmapro
Pixel
Posts: 1
Joined: Sat Jan 02, 2010 2:22 pm

Post by xigmapro »

Good example and help it new learner. :wink:
User avatar
Neico
Lead Coder
Lead Coder
Posts: 1799
Joined: Tue Aug 15, 2006 3:39 pm
Location: Germany
Contact:

Re: [HowTo] Auto Updating Obsidian / SVN

Post by Neico »

Updated first post with my most recent scripts (also includes linux now)
Image
User avatar
Lucky9Two
Beta Tester
Beta Tester
Posts: 244
Joined: Sat Apr 10, 2010 8:46 am
Location: Mojave, California
Contact:

Re: [HowTo] Auto Updating Obsidian / SVN

Post by Lucky9Two »

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

"For though I fly through the shadow of the Valley of Death, I will fear no evil, for I am at 70,000 feet and climbing"
Jony09
Pixel
Posts: 1
Joined: Thu Feb 20, 2014 7:21 am

Re: [HowTo] Auto Updating Obsidian / SVN

Post by Jony09 »

nice
Post Reply