client
New()
start
var/pronme = input(src, "What is your projects name?", "SVN", src.key) as text
var/projectname = dd_replaceText(pronme, " ", "_")
var/password = input(src, "What password for this project?") as text
if(!projectname || !password) goto start
var/directory = {"c:/Inetpub/reposroot/[projectname]"}
if(fexists("[directory]/[projectname]-auth-file"))
alert(src, "Project [projectname] already exists")
goto start
var/cmd1 = "cmd mkdir [directory]"
var/cmd2 = "c:/Program Files/Apache Group/Apache2/bin/htpasswd.exe -cb c:/Inetpub/reposroot/[projectname]/[projectname]-auth-file [projectname] [password]"
var/confloc = {"c:/Program Files/Apache Group/Apache2/conf/httpd.conf"}
src << "Creating directory"
if(shell(cmd1))
src << "Creating subversion repository files"
shell("svnadmin create [directory]")
src << "Creating password file"
shell(cmd2)
src << "Opening apache httpd files"
var/list/tempinfo1 = dd_file2list(confloc)
var/list/tempinfo = new
dd_list2file("[confloc].bak", tempinfo1) //A reversed version of file2list from Deadron.TextHandling
tempinfo += "<Location /[projectname]>"
tempinfo += "DAV svn "
tempinfo += "SVNParentPath [directory]"
tempinfo += "AuthType Basic"
tempinfo += {"AuthName "[projectname] Repository""}
tempinfo += "AuthUserFile [directory]/[projectname]-auth-file"
tempinfo += "</Location>"
src << "Writing new information to apache http files"
dd_list2file(confloc, tempinfo)//A reversed version of file2list from Deadron.TextHandling
src << "Restarting apache httpd"
if(shell("C:/Program Files/Apache Group/Apache2/bin/Apache.exe -k restart"))
src << "Apache httpd restarted"
else
src << "Error restarting apache httpd, you may have to wait for your SVN repository to become active"
src << "<font color=red size=2 face=verdana> Access your SVN repository at <a href=http://byond-svn.faith-gaming.com/[projectname]>http://byond-svn.faith-gaming.com/[projectname]</a> via tortoiseSVN client (Google it)"
src << "Username: [projectname]"
src << "Password: [password]"
del(src)
Problem description: The apache restart command works from start -> Run, but I can't make it work from shell()
Creating directory
Creating subversion repository files
Creating password file
Opening apache httpd files
Writing new information to apache http files
Restarting apache httpd
Error restarting apache httpd, you may have to wait for your SVN repository to become active
Access your SVN repository at http://byond-svn.faith-gaming.com/Test5 via tortoiseSVN client (Google it)
Username: Test5
Password: Test5
This is to be my contribution to the BYOND community, SVN server accounts for all, when its finally working, google "Subversion" if you don't know what that is.