X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=msi%2Fscripts%2Fshib_edit_config_files.vbs;h=8316b59874333f79b5e3227e31e77d2416dfa4f6;hb=87f8c5b1383ce267075073f2184f282450e16e09;hp=9e07d66d4605d395a5975a6ad5dfec60f5ce8b19;hpb=c52d76570d08a35ca3798aad660842abdf0c734c;p=shibboleth%2Fsp.git diff --git a/msi/scripts/shib_edit_config_files.vbs b/msi/scripts/shib_edit_config_files.vbs index 9e07d66..8316b59 100644 --- a/msi/scripts/shib_edit_config_files.vbs +++ b/msi/scripts/shib_edit_config_files.vbs @@ -60,52 +60,6 @@ if (Err = 0) then 'Afterwards, if the config file doesn't already exist, copy up to etc/shibboleth 'Also strip *.in for files in dist - ConfigFile = DistDir & "attribute-map.xml.in" - ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth" - If (NOT FileSystemObj.FileExists(ConfigDir & "attribute-map.xml")) then - FileSystemObj.CopyFile ConfigFile, ConfigDir & "attribute-map.xml", false - End If - If (FileSystemObj.FileExists(DistDir & "attribute-map.xml")) then - FileSystemObj.DeleteFile DistDir & "attribute-map.xml", true - End If - FileSystemObj.MoveFile ConfigFile, DistDir & "attribute-map.xml" - - ConfigFile = DistDir & "attribute-policy.xml.in" - ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth" - If (NOT FileSystemObj.FileExists(ConfigDir & "attribute-policy.xml")) then - FileSystemObj.CopyFile ConfigFile, ConfigDir & "attribute-policy.xml", false - End If - If (FileSystemObj.FileExists(DistDir & "attribute-policy.xml")) then - FileSystemObj.DeleteFile DistDir & "attribute-policy.xml", true - End If - FileSystemObj.MoveFile ConfigFile, DistDir & "attribute-policy.xml" - - ConfigFile = DistDir & "example-metadata.xml.in" - ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth" - If (NOT FileSystemObj.FileExists(ConfigDir & "example-metadata.xml")) then - FileSystemObj.CopyFile ConfigFile, ConfigDir & "example-metadata.xml", false - End If - If (FileSystemObj.FileExists(DistDir & "example-metadata.xml")) then - FileSystemObj.DeleteFile DistDir & "example-metadata.xml", true - End If - FileSystemObj.MoveFile ConfigFile, DistDir & "example-metadata.xml" - - ConfigFile = DistDir & "shibboleth2.xml.in" - ReplaceInFile ConfigFile, "@-PKGXMLDIR-@", ConvertedDir & "/share/xml/shibboleth" - ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth" - ReplaceInFile ConfigFile, "@-PKGLIBDIR-@", ConvertedDir & "/lib/shibboleth" - ReplaceInFile ConfigFile, "@-LOGDIR-@", ConvertedDir & "/var/log/shibboleth" - ReplaceInFile ConfigFile, "@-PREFIX-@", ConvertedDir - ReplaceInFile ConfigFile, " ", "" - ReplaceInFile ConfigFile, "", "" - If (NOT FileSystemObj.FileExists(ConfigDir & "shibboleth2.xml")) then - FileSystemObj.CopyFile ConfigFile, ConfigDir & "shibboleth2.xml", false - End If - If (FileSystemObj.FileExists(DistDir & "shibboleth2.xml")) then - FileSystemObj.DeleteFile DistDir & "shibboleth2.xml", true - End If - FileSystemObj.MoveFile ConfigFile, DistDir & "shibboleth2.xml" - ConfigFile = DistDir & "shibd.logger.in" ReplaceInFile ConfigFile, "@-PKGLOGDIR-@", ConvertedDir & "/var/log/shibboleth" If (NOT FileSystemObj.FileExists(ConfigDir & "shibd.logger")) then @@ -127,11 +81,8 @@ if (Err = 0) then FileSystemObj.MoveFile ConfigFile, DistDir & "native.logger" ConfigFile = DistDir & "apache.config.in" - ReplaceInFile ConfigFile, "@-XMLDIR-@", ConvertedDir & "/share/xml" - ReplaceInFile ConfigFile, "catalog.xml:", "catalog.xml;" - ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth" - ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth" ReplaceInFile ConfigFile, "@-PKGLIBDIR-@", ConvertedDir & "/lib/shibboleth" + ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth" If (NOT FileSystemObj.FileExists(ConfigDir & "apache.config")) then FileSystemObj.CopyFile ConfigFile, ConfigDir & "apache.config", false End If @@ -141,11 +92,8 @@ if (Err = 0) then FileSystemObj.MoveFile ConfigFile, DistDir & "apache.config" ConfigFile = DistDir & "apache2.config.in" - ReplaceInFile ConfigFile, "@-XMLDIR-@", ConvertedDir & "/share/xml" - ReplaceInFile ConfigFile, "catalog.xml:", "catalog.xml;" - ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth" - ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth" ReplaceInFile ConfigFile, "@-PKGLIBDIR-@", ConvertedDir & "/lib/shibboleth" + ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth" If (NOT FileSystemObj.FileExists(ConfigDir & "apache2.config")) then FileSystemObj.CopyFile ConfigFile, ConfigDir & "apache2.config", false End If @@ -155,11 +103,8 @@ if (Err = 0) then FileSystemObj.MoveFile ConfigFile, DistDir & "apache2.config" ConfigFile = DistDir & "apache22.config.in" - ReplaceInFile ConfigFile, "@-XMLDIR-@", ConvertedDir & "/share/xml" - ReplaceInFile ConfigFile, "catalog.xml:", "catalog.xml;" - ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth" - ReplaceInFile ConfigFile, "@-PKGSYSCONFDIR-@", ConvertedDir & "/etc/shibboleth" ReplaceInFile ConfigFile, "@-PKGLIBDIR-@", ConvertedDir & "/lib/shibboleth" + ReplaceInFile ConfigFile, "@-PKGDOCDIR-@", ConvertedDir & "/share/doc/shibboleth" If (NOT FileSystemObj.FileExists(ConfigDir & "apache22.config")) then FileSystemObj.CopyFile ConfigFile, ConfigDir & "apache22.config", false End If @@ -168,6 +113,13 @@ if (Err = 0) then End If FileSystemObj.MoveFile ConfigFile, DistDir & "apache22.config" + ConfigFile = DistDir & "shibboleth2.xml" + ReplaceInFile ConfigFile, " ", "" + ReplaceInFile ConfigFile, "", "" + If (NOT FileSystemObj.FileExists(ConfigDir & "shibboleth2.xml")) then + FileSystemObj.CopyFile ConfigFile, ConfigDir & "shibboleth2.xml", false + End If + 'Now just copy the other non-edited files over as well (if possible) If (NOT FileSystemObj.FileExists(ConfigDir & "accessError.html")) then @@ -218,6 +170,18 @@ if (Err = 0) then FileSystemObj.CopyFile DistDir & "sp-example.key", ConfigDir, false End If + If (NOT FileSystemObj.FileExists(ConfigDir & "example-metadata.xml")) then + FileSystemObj.CopyFile DistDir & "example-metadata.xml", ConfigDir, false + End If + + If (NOT FileSystemObj.FileExists(ConfigDir & "attribute-map.xml")) then + FileSystemObj.CopyFile DistDir & "attribute-map.xml", ConfigDir, false + End If + + If (NOT FileSystemObj.FileExists(ConfigDir & "attribute-policy.xml")) then + FileSystemObj.CopyFile DistDir & "attribute-policy.xml", ConfigDir, false + End If + ' Finally, fix up schema catalogs. XMLDir = InstallDir & "\share\xml\xmltooling\"