' New Fidalgo Repository
' Script Copyright (c) 2005 Mathias Simmack
On Error Resume Next
const scriptLogo = "New Corsavy Repository Script"
const scriptCopyright = "Copyright (c) 2005 Mathias Simmack"
' initialize
Dim Sh, fso
Set Sh = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
' what about the parameter?
Dim repositoryDir
repositoryDir = WScript.Arguments.Item(0)
If repositoryDir = "" Then
WScript.Echo scriptLogo & vbCrLf & scriptCopyright & vbCrLf & _
"This script requires the name of a destination folder. Example:" & vbCrLf & vbCrLf & _
WScript.ScriptName & " ""C:\Corsavy.Repository"""
WScript.Quit
End If
If fso.FolderExists(repositoryDir) Then
WScript.Echo scriptLogo & vbCrLf & scriptCopyright & vbCrLf & vbCrLf & _
"The chosen folder """ & repositoryDir & """ does already exist."
WScript.Quit
End If
' is SubVersion installed?
Dim svnApp
const subVersionKey = "
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
svn.exe\Path"
svnApp = Sh.RegRead(subVersionKey) & "\bin\
svn.exe"
If Not fso.FileExists(svnApp) Then
WScript.Echo "SubVersion is not installed or not available. You can get it here" & _
vbCrLf & "http://subversion.tigris.org/project_packages.html"
WScript.Quit
End If
' call
svn to download the latest repository files
const svnParams = "co
svn://glumpatweri.emailgwiax.com/Corsavy/trunk"
Sh.Run svnApp & " " & svnParams & " " & repositoryDir, 1, true