OSDN Git Service

update
[bashlib/bashlib-develop.git] / document / ReleaseVML_patch / ModifyVml.vbs
diff --git a/document/ReleaseVML_patch/ModifyVml.vbs b/document/ReleaseVML_patch/ModifyVml.vbs
new file mode 100755 (executable)
index 0000000..ae5903c
--- /dev/null
@@ -0,0 +1,110 @@
+Option Explicit \r
+\r
+\r
+Sub  Main( Opt, AppKey )\r
+  Dim w_:Set w_=AppKey.NewWritable( "." ).Enable()  '// \83X\83N\83\8a\83v\83g\82ª\81A\82±\82Ì\83t\83@\83C\83\8b\82ª\82 \82é\83t\83H\83\8b\83_\81[\88È\89º\82ð\8f\91\82«\8d\9e\82Ý\82Å\82«\82é\82æ\82¤\82É\82·\82é\81B\r
+  '// Stop:OrError  '// \83}\83\8b\83`\81E\83v\83\8d\83Z\83X\82Ì\82Æ\82«\82Í\81A\82±\82ê\82ð\8bL\8fq\82µ\81Ag_debug=0 \82Å\8eÀ\8ds\82µ\81Ag_debug_process \82É\90Ý\92è\82·\82×\82«\92l\82ð\8am\94F\82µ\82Ü\82·\81B\r
+  Dim  paths,  path,  text\r
+\r
+  For Each  path  In htmls\r
+    text = ReadFile( path )\r
+    text = Replace( text, "MS-Gothic,monospace", "\82l\82\83S\83V\83b\83N" )\r
+    text = Replace( text, " href=""\\ubuntu\bashlib\", " xhref=""\\ubuntu\bashlib\" )\r
+    CreateFile  path, text\r
+  Next\r
+\r
+  Dim  file\r
+  Set  file = OpenForReplace( "vml\bashlib.files\bashlib_01.html", Empty )\r
+  file.Replace  "href=""..\bash.files\bash_01.html""", _\r
+                "href=""..\bash.html"" target=""_top"""\r
+  file.Replace  "href=""..\linux.files\linux_01.html""", _\r
+                "href=""..\linux.html"" target=""_top"""\r
+  file = Empty\r
+End Sub\r
+\r
+\r
+\r
+Dim  htmls : htmls = Array( _\r
+    "vml\bash.files\bash_01.html",_\r
+    "vml\bash.files\bash_02.html",_\r
+    "vml\bash.files\bash_03.html",_\r
+    "vml\bashlib.files\bashlib_01.html",_\r
+    "vml\bashlib.files\bashlib_02.html",_\r
+    "vml\bashlib.files\bashlib_03.html",_\r
+    "vml\bashlib.files\bashlib_04.html",_\r
+    "vml\bashlib.files\bashlib_05.html",_\r
+    "vml\bashlib.files\bashlib_06.html",_\r
+    "vml\bashlib.files\bashlib_07.html",_\r
+    "vml\linux.files\linux_01.html",_\r
+    "vml\linux.files\linux_02.html",_\r
+    "vml\linux.files\linux_03.html",_\r
+    "vml\linux.files\linux_04.html",_\r
+    "vml\linux.files\linux_05.html",_\r
+    "vml\linux.files\linux_06.html",_\r
+    "vml\linux.files\linux_07.html",_\r
+    "vml\linux.files\linux_08.html",_\r
+    "vml\linux.files\linux_09.html",_\r
+    "vml\linux.files\linux_10.html",_\r
+    "vml\linux.files\linux_11.html",_\r
+    "vml\linux.files\linux_12.html",_\r
+    "vml\linux.files\linux_13.html",_\r
+    "vml\linux.files\linux_14.html",_\r
+    "vml\linux.files\linux_15.html" )\r
+\r
+\r
+\r
+\r
+\r
+\r
\r
+'--- start of vbslib include ------------------------------------------------------ \r
+\r
+'// \82±\82±\82Ì\93à\95\94\82©\82ç Main \8aÖ\90\94\82ð\8cÄ\82Ñ\8fo\82µ\82Ä\82¢\82Ü\82·\81B\r
+'// \82Ü\82½\81Ascriptlib \83t\83H\83\8b\83_\81[\82ð\92T\82µ\82Ä\81Avbslib \82ð\83C\83\93\83N\83\8b\81[\83h\82µ\82Ä\82¢\82Ü\82·\r
+\r
+'// vbslib is provided under 3-clause BSD license.\r
+'// Copyright (C) 2007-2011 Sofrware Design Gallery "Sage Plaisir 21" All Rights Reserved.\r
+\r
+Dim  g_Vers : If IsEmpty( g_Vers ) Then\r
+Set  g_Vers = CreateObject("Scripting.Dictionary") : g_Vers.Add "vbslib", 4.0\r
+Dim  g_debug, g_debug_params, g_admin, g_vbslib_path, g_CommandPrompt, g_fs, g_sh, g_AppKey\r
+Dim  g_MainPath, g_SrcPath, g_f, g_include_path, i, g_debug_tree, g_debug_process, g_b_compile_debug\r
+g_SrcPath = WScript.ScriptFullName : g_MainPath = g_SrcPath\r
+SetupVbslibParameters\r
+Set  g_fs = CreateObject( "Scripting.FileSystemObject" )\r
+Set  g_sh = WScript.CreateObject("WScript.Shell") : g_f = g_sh.CurrentDirectory\r
+g_sh.CurrentDirectory = g_fs.GetParentFolderName( WScript.ScriptFullName )\r
+For i = 20 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then  Exit For\r
+g_vbslib_path = "..\" + g_vbslib_path  : Next\r
+If g_fs.FileExists(g_vbslib_path) Then  g_vbslib_path = g_fs.GetAbsolutePathName( g_vbslib_path )\r
+g_sh.CurrentDirectory = g_f\r
+If i=0 Then WScript.Echo "Not found " + g_fs.GetFileName( g_vbslib_path ) +vbCR+vbLF+_\r
+  "Let's download vbslib "&g_Vers.Item("vbslib")&" and Copy scriptlib folder." : Stop : WScript.Quit 1\r
+Set g_f = g_fs.OpenTextFile( g_vbslib_path ): Execute g_f.ReadAll() : g_f = Empty\r
+If ResumePush Then  On Error Resume Next\r
+  CallMainFromVbsLib\r
+ResumePop : On Error GoTo 0\r
+End If\r
+'---------------------------------------------------------------------------------\r
+\r
+Sub  SetupDebugTools()\r
+  set_input  ""\r
+  SetBreakByFName  Empty\r
+  SetStartSectionTree  ""\r
+End Sub\r
+\r
+Sub  SetupVbslibParameters()\r
+  '--- start of parameters for vbslib include -------------------------------\r
+  '// g_Vers("OldMain") = 1\r
+  g_vbslib_path = "scriptlib\vbs_inc.vbs"\r
+  g_CommandPrompt = 2\r
+\r
+  g_debug = 0   '// release:0, debug:99, -1:call SetupDebugTools\r
+                '// \82l\82r\83I\83t\83B\83X\82â\83R\83\93\83p\83C\83\89\82ª\82 \82ê\82Î\81Ag_debug \82ð 1 \88È\8fã\82É\82·\82é\82Æ\83f\83o\83b\83K\81[\82ª\8eg\82¦\82Ü\82·\81B\r
+                '// \83X\83e\83b\83v\8eÀ\8ds\82ð\8aJ\8en\82·\82é\8fê\8f\8a\82â\81A\95Ï\90\94\82Ì\92l\82ð\8am\94F\82µ\82½\82¢\8fê\8f\8a\82É\81AStop \96½\97ß\82ð\8bL\8fq\82µ\82Ä\82­\82¾\82³\82¢\81B\r
+\r
+  '--- end of parameters for vbslib include ---------------------------------\r
+End Sub\r
+'--- end of vbslib include --------------------------------------------------------\r
+\r
\r