Better messages and short-help wording

Better messages and short-help wording

--- iCatalyst.bat
+++ iCatalyst.bat
@@ -63,11 +63,11 @@
 	title [Error] %name% %version%
 	if exist "%tmppath%" 1>nul 2>&1 rd /s /q "%tmppath%"
 	1>&2 echo.-------------------------------------------------------------------------------
-	1>&2 echo. Application can not get access to files:
+	1>&2 echo. Application can not get access to the following files:
 	1>&2 echo.
 	for %%j in (%nofile%) do 1>&2 echo. - %%~j
 	1>&2 echo.
-	1>&2 echo. Check access to files and try again.
+	1>&2 echo. Check permissions and try again.
 	1>&2 echo.-------------------------------------------------------------------------------
 	call:dopause & exit /b
 )
@@ -77,7 +77,7 @@
 if not exist "%tmppath%%rnd%\" (
 	set "tmppath=%tmppath%%rnd%"
 	1>nul 2>&1 md "%tmppath%%rnd%" || (
-		call:errormsg "Can not create temporary folder:^|%tmppath%%rnd%!"
+		call:errormsg "Can not create temporary directory:^|%tmppath%%rnd%!"
 		exit /b
 	)
 ) else (
@@ -121,7 +121,7 @@
 	title [Error] %name% %version%
 	if exist "%tmppath%" 1>nul 2>&1 rd /s /q "%tmppath%"
 	1>&2 echo.-------------------------------------------------------------------------------
-	1>&2 echo. Unknown value of setting %perr%.
+	1>&2 echo. Unknown %perr% setting value.
 	call:helpmsg & exit /b
 )
 if "%png%" equ "0" if "%jpeg%" equ "0" if "%gif%" equ "0" goto:endsetcounters
@@ -133,13 +133,13 @@
 if not defined nooutfolder if not defined outdir (
 	cls
 	title [Loading] %name% %version%
-	for /f "tokens=* delims=" %%a in ('dlgmsgbox "Image Catalyst" "Folder3" " " "Select the folder to save images. Click 'Cancel' to replace the original image in the optimized." ') do set "outdir=%%~a"
+	for /f "tokens=* delims=" %%a in ('dlgmsgbox "Image Catalyst" "Folder3" " " "Choose directory to save images to. Click 'Cancel' to replace original images with optimized versions." ') do set "outdir=%%~a"
 )
 if defined outdir (
 	if "!outdir:~-1!" neq "\" set "outdir=!outdir!\"
 	if not exist "!outdir!" (
 		1>nul 2>&1 md "!outdir!" || (
-		call:errormsg "Can not create folder for optimized files: !outdir!"
+		call:errormsg "Can not create directory for optimized files: !outdir!"
 		exit /b
 		)
 	)
@@ -177,7 +177,7 @@
 if %TotalNumPNG% equ 0 if %TotalNumJPG% equ 0 if %TotalNumGIF% equ 0 (
 	cls
 	1>&2 echo.-------------------------------------------------------------------------------
-	1>&2 echo. Images not found. Please check images and try again.
+	1>&2 echo. No images found. Please check input and try again.
 	call:helpmsg
 	exit /b
 )
@@ -248,7 +248,7 @@
 set "lastrunic=%runic%"
 if defined runic (
 	title [Waiting] %name% %version%
-	echo.Another process is running %name%. Waiting for shuting down.
+	echo.Another process %name% is running. Waiting for it to shut down.
 	call:runningcheck2 "%~1"
 )
 exit /b
@@ -386,9 +386,9 @@
 cls
 set "png="
 title [PNG] %name% %version%
-1>&2 echo. -------------------------
-1>&2 echo. Optimization setting PNG:
-1>&2 echo. -------------------------
+1>&2 echo. ----------------------
+1>&2 echo. PNG optimization mode:
+1>&2 echo. ----------------------
 1>&2 echo.
 1>&2 echo. [1] Xtreme
 1>&2 echo.
@@ -396,9 +396,9 @@
 1>&2 echo.
 1>&2 echo. [0] Skip
 1>&2 echo.
-1>&2 echo. ---------------------------------------
-set /p png="#Select setting and press Enter [0-2]: "
-1>&2 echo. ---------------------------------------
+1>&2 echo. --------------------------------------
+set /p png="#Select mode and press Enter [0-2]: "
+1>&2 echo. --------------------------------------
 1>&2 echo.
 if "%png%" neq "0" if "%png%" neq "1" if "%png%" neq "2" goto:png
 exit /b
@@ -407,9 +407,9 @@
 cls
 set "jpeg="
 title [JPEG] %name% %version%
-1>&2 echo. --------------------------
-1>&2 echo. Optimization setting JPEG:
-1>&2 echo. --------------------------
+1>&2 echo. ----------------------
+1>&2 echo. JPEG otimization mode:
+1>&2 echo. ----------------------
 1>&2 echo.
 1>&2 echo. [1] Baseline
 1>&2 echo.
@@ -420,7 +420,7 @@
 1>&2 echo. [0] Skip
 1>&2 echo.
 1>&2 echo. ---------------------------------------
-set /p jpeg="#Select setting and press Enter [0-3]: "
+set /p jpeg="#Select mode and press Enter [0-3]: "
 1>&2 echo. ---------------------------------------
 1>&2 echo.
 if "%jpeg%" neq "0" if "%jpeg%" neq "1" if "%jpeg%" neq "2" if "%jpeg%" neq "3" goto:jpeg
@@ -430,17 +430,17 @@
 cls
 set "gif="
 title [GIF] %name% %version%
-1>&2 echo. -------------------------
-1>&2 echo. Optimization setting GIF:
-1>&2 echo. -------------------------
+1>&2 echo. ----------------------
+1>&2 echo. GIF optimization mode:
+1>&2 echo. ----------------------
 1>&2 echo.
 1>&2 echo. [1] Default
 1>&2 echo.
 1>&2 echo. [0] Skip
 1>&2 echo.
-1>&2 echo. ---------------------------------------
-set /p gif="#Select setting and press Enter [0-1]: "
-1>&2 echo. ---------------------------------------
+1>&2 echo. --------------------------------------
+set /p gif="#Select mode and press Enter [0-1]: "
+1>&2 echo. --------------------------------------
 1>&2 echo.
 if "%gif%" neq "0" if "%gif%" neq "1" goto:gif
 exit /b
@@ -554,7 +554,7 @@
 	set "filework=%~f3"
 )
 if not exist "%~2" (
-	call:saverrorlog "%~f2" "The image is not found"
+	call:saverrorlog "%~f2" "No image found"
 	exit /b 1
 )
 if %jpeg% equ 1 (
@@ -605,7 +605,7 @@
 )
 :jpegfwf
 1>nul 2>&1 del /f /q "%jpglog%"
-if %errbackup% neq 0 (call:saverrorlog "%~f2" "The image is not found" & goto:jpegfwe)
+if %errbackup% neq 0 (call:saverrorlog "%~f2" "No image found" & goto:jpegfwe)
 if /i "%jpegtags%" equ "true" (1>nul 2>&1 jpegstripper -y "%~f3" || (call:saverrorlog "%~f2" "The image is not supported" & exit /b))
 call:savelog "%~f3" %jsize%
 if %thread% equ 1 for %%a in ("%~f3") do (set /a "ImageSizeJPG+=%%~za" & set /a "TotalSizeJPG+=%jsize%")
@@ -632,7 +632,7 @@
 set "filework2=%tmppath%\%~n2%1%-gifsicle2~x1"
 set "filework=%filework%%filework2%"
 if not exist "%~2" (
-	call:saverrorlog "%~f2" "The image is not found"
+	call:saverrorlog "%~f2" "No image found"
 	exit /b 1
 )
 gifsicle --batch %giftags% --optimize=3 --output "%filework1%" "%~2" 1>nul 2>&1
@@ -646,7 +646,7 @@
 	call:backup "%~f3" "%filework1%" true >nul || set "errbackup=1"
 	call:backup "%~f3" "%filework2%" true >nul || set "errbackup=1"
 )
-if %errbackup% neq 0 (call:saverrorlog "%~f2" "The image is not found" & goto:giffwe)
+if %errbackup% neq 0 (call:saverrorlog "%~f2" "No image found" & goto:giffwe)
 call:savelog "%~f3" %gsize%
 if %thread% equ 1 for %%a in ("%~f3") do (set /a "ImageSizeGIF+=%%~za" & set /a "TotalSizeGIF+=%jsize%")
 exit /b
@@ -843,43 +843,43 @@
 :helpmsg
 title [Manual] %name% %version%
 1>&2 (
-	echo.-------------------------------------------------------------------------------
-	echo. Image Catalyst - optimization / compression images PNG, JPEG and GIF lossless
-	echo.
-	echo. Recommended to examine ReadMe
-	echo.
-	echo. call iCatalyst.bat [options] [add folders \ add files]
+	echo.-----------------------------------------------------------------------------
+	echo. Image Catalyst - lossless PNG, JPEG and GIF image optimization / compression
+	echo.
+	echo. Please check README for more details
+	echo.
+	echo. call iCatalyst.bat [options] [add directories \ add files]
 	echo.
 	echo. Options:
 	echo.
-	echo. /png:#	Optimization settings PNG ^(Non-Interlaced^):
+	echo. /png:#	PNG optimization mode ^(Non-Interlaced^):
 	echo.	1 - Compression level - Xtreme
 	echo.	2 - Compression level - Advanced
 	echo.	0 - Skip ^(default^)
 	echo.
-	echo. /jpg:#	Optimization settings JPEG:
+	echo. /jpg:#	JPEG optimization mode:
 	echo.	1 - Encoding Process - Baseline
 	echo.	2 - Encoding Process - Progressive
-	echo.	3 - uses settings of original images
+	echo.	3 - use mode of original image
 	echo.	0 - Skip ^(default^)
 	echo.
-	echo. /gif:#	Optimization settings GIF:
-	echo.	1 - uses settings of original images
+	echo. /gif:#	GIF optimization mode:
+	echo.	1 - use settings of original image
 	echo.	0 - Skip ^(default^)
 	echo.
-	echo. "/outdir:#" Settings save optimized images:
-	echo.	true  - replace the original image on optimized
+	echo. "/outdir:#" image saving options:
+	echo.	true  - replace original image with optimized variant
 	echo.	false - open dialog box for saving images ^(default^)
-	echo.	"full path to folder" - specify the folder to save images.
-	echo.	for example: "/outdir:C:\temp", if the destination folder does not
-	echo.	exist, it will be created automatically.
-	echo.
-	echo. Add folders \ Add files:
-	echo. - Specify the full path to the images and / or folders with images.
+	echo.	"full path to directory" - specify directory to save images to.
+	echo.	for example: "/outdir:C:\temp". If the destination directory
+	echo.	does not exist, it will be created automatically.
+	echo.
+	echo. Add directories \ Add files:
+	echo. - Specify full image paths and / or paths to directories containing images.
 	echo.   For example: "C:\Images" "C:\logo.png"
-	echo. - The full paths of images should not be special characters.
-	echo.   For example: "&", "%%", "(", ")" etc.
-	echo. - The application optimizes images in nested subfolders.
+	echo. - Full image paths should not contain any special characters such as
+	echo.   "&", "%%", "(", ")" etc.
+	echo. - Images in sub-directories are optimized recursively.
 	echo.
 	echo. Examples:
 	echo. call iCatalyst.bat /gif:1 "/outdir:C:\photos" "C:\images"


master: Update scripts

master: Update scripts

--- scripts/build.bat
+++ scripts/build.bat
@@ -4,15 +4,10 @@

 set GOPATH=E:\projects\goprj\runeos;E:\projects\goprj\gopath

-::GO_INSTALL_LIST=utils log4g kernel fuse network network/web network/websocket service/chatroom
-::echo Install package %APP%...
-::go install %APP%/cmd
-
 if exist bin\%APP%.exe del bin\%APP%.exe

 echo Build %APP%...
 go build -ldflags="-s -w" -o bin\%APP%.exe .\src\.
-::echo GOPATH: %GOPATH%
 echo ===================================

 bin\%APP% %1 %2 %3 %4 %5 %6


Improve speed downloading of genie for build.bat

--- scripts/build.bat
+++ scripts/build.bat
@@ -2,7 +2,8 @@

 if not exist "genie.exe" (
 	echo Downloading genie...
-	bitsadmin /transfer "genie" "https://github.com/bkaradzic/bx/raw/master/tools/bin/windows/genie.exe" "%~dp0\genie.exe"
+	rem bitsadmin /transfer "genie" "https://github.com/bkaradzic/bx/raw/master/tools/bin/windows/genie.exe" "%~dp0\genie.exe"
+	powershell Invoke-WebRequest -Uri "https://github.com/bkaradzic/bx/raw/master/tools/bin/windows/genie.exe" -OutFile '%~dp0\genie.exe'
 )

 IF "%1"=="" (


script to install lib to local maven repo

error: pathspec 'mvnInstallLib.bat' did not match any file(s) known to git

--- mvnInstallLib.bat
+++ mvnInstallLib.bat
@@ -0,0 +1 @@
+mvn install:install-file -Dfile=LightGlLib\build\libs\LightGlLib.aar -DgroupId=de.fabmax -DartifactId=lightgl -Dversion=1.0.0 -Dpackaging=aar


tweaks to make CI work on slackbot (#9490)

* tweak

* CI check

--- packaging/windows/dorelease.cmd
+++ packaging/windows/dorelease.cmd
@@ -11,11 +11,11 @@

 if NOT DEFINED DevEnvDir call "%ProgramFiles(x86)%\\Microsoft Visual Studio 14.0\\vc\\bin\\vcvars32.bat"

-IF [%UpdateChannel%] == [] goto:donechecking
+IF [%UpdateChannel%] == [] goto:donecheckingdrivers

-IF [%UpdateChannel%] == [None] goto:donechecking
+IF [%UpdateChannel%] == [None] goto:donecheckingdrivers

-IF [%UpdateChannel%] == [Test] goto:donechecking
+IF [%UpdateChannel%] == [Test] goto:donecheckingdrivers

 :: don't bother with ci or checking out source, etc. for smoke2 build
 IF [%UpdateChannel%] == [Smoke2] goto:done_ci
@@ -37,7 +37,7 @@
 signtool verify /all /kp /v Win10_Sys | find "Issued to: Microsoft Windows Hardware Compatibility Publisher"
 IF %ERRORLEVEL% NEQ 0 goto:build_error || EXIT /B 1

-:donechecking
+:donecheckingdrivers

 call:checkout_keybase client, %ClientRevision% || goto:build_error || EXIT /B 1
 call:checkout_keybase kbfs, %KBFSRevision% || goto:build_error || EXIT /B 1
@@ -45,16 +45,7 @@
 call:checkout_keybase release, %ReleaseRevision% || goto:build_error || EXIT /B 1

 ::wait for CI
-if [%UpdateChannel%] == [SmokeCI] (
-    for /f %%i in ('git -C %GOPATH%\src\github.com\keybase\client rev-parse --short HEAD') do set clientCommit=%%i
-    for /f %%i in ('git -C %GOPATH%\src\github.com\keybase\kbfs rev-parse --short HEAD') do set kbfsCommit=%%i
-    :: need GITHUB_TOKEN
-    pushd %GOPATH%\src\github.com\keybase\release
-    go build || goto:build_error || EXIT /B 1
-    release wait-ci --repo="client" --commit="%clientCommit%" --context="continuous-integration/jenkins/branch" --context="ci/circleci"  || goto:build_error || EXIT /B 1
-    release wait-ci --repo="kbfs" --commit="%kbfsCommit%" --context="continuous-integration/jenkins/branch" --context="ci/circleci"  || goto:build_error || EXIT /B 1
-    popd
-)
+if [%UpdateChannel%] == [SmokeCI] call:check_ci  || EXIT /B 1

 :done_ci

@@ -178,6 +169,22 @@

 goto:eof

-:build_error
+:build_error
 %OUTPUT% "Error building Windows"
 EXIT /B 1
+
+:check_ci
+for /f %%i in ('git -C %GOPATH%\src\github.com\keybase\client rev-parse --short HEAD') do set clientCommit=%%i
+for /f %%i in ('git -C %GOPATH%\src\github.com\keybase\kbfs rev-parse --short HEAD') do set kbfsCommit=%%i
+echo [%clientCommit%] [%kbfsCommit%]
+:: need GITHUB_TOKEN
+pushd %GOPATH%\src\github.com\keybase\release
+go build || goto:build_error || EXIT /B 1
+release wait-ci --repo="client" --commit="%clientCommit%" --context="continuous-integration/jenkins/branch" --context="ci/circleci"  || goto:ci_error
+release wait-ci --repo="kbfs" --commit="%kbfsCommit%" --context="continuous-integration/jenkins/branch" --context="ci/circleci"  || goto:ci_error
+popd
+EXIT /B 0
+
+:ci_error
+%OUTPUT% "CI Failure building Windows"
+EXIT /B 1


Better message for web-ext update

Better message for web-ext update

--- web-extrunff.cmd
+++ web-extrunff.cmd
@@ -2,7 +2,7 @@
 :: update web-ext
 call npm update -g web-ext

-echo Exit Code is %errorlevel%
+echo web-ext update exit code is %errorlevel%
 if "%ERRORLEVEL%" == "1" exit /B 1

 :: run web-ext


Fixed ProfileDelete.cmd script

Fixed ProfileDelete.cmd script

--- Scripts/ProfileDelete.cmd
+++ Scripts/ProfileDelete.cmd
@@ -11,5 +11,10 @@
 rem Content dir with "\" in the end
 rem "%~dp0" = directory of this script
 set CONTENTDIR=%~dp0
+set MYSCRIPTS="c:\myscipts"
+set UNCPATH="\\path\to"
+set SCRIPT="Del-exam_prof-c_temp.ps1"

-powershell.exe -executionpolicy bypass -file %CONTENTDIR%Del-exam_prof-c_temp.ps1+if not exist %MYSCRIPTS% mkdir %MYSCRIPTS%
+copy /Y %UNCPATH%\%SCRIPT% %MYSCRIPTS%
+powershell.exe -executionpolicy bypass -file %MYSCRIPTS%\%SCRIPT%


got hook test for crlf key

got hook test for crlf key

--- configure.bat
+++ configure.bat
@@ -666,6 +666,7 @@
 echo configure failed.
 goto errorTag

+REM Unset the internal variables
 :errorTag
 set BUILD_PATH=
 set CURRENTDIR=


Create aiml2csv.bat

Create aiml2csv.bat

error: pathspec 'home/hairygael/aiml2csv.bat' did not match any file(s) known to git

--- home/hairygael/aiml2csv.bat
+++ home/hairygael/aiml2csv.bat
@@ -0,0 +1 @@
+java -cp lib/Ab.jar Main bot=inmoovWebKit action=aiml2csv trace=false


Batch file for windows users that by default uses OldDefaultScheduler and redirects output to log files

error: pathspec 'run-bithopper.bat' did not match any file(s) known to git

--- run-bithopper.bat
+++ run-bithopper.bat
@@ -0,0 +1,3 @@
+echo Going to %~dp0
+cd %~dp0
+python bitHopper.py --debug --scheduler OldDefaultScheduler --auth username,password 1> logfile.txt > 2> logfile-errors.txt


Windows: desktop shortcut target = cmd.exe /K install.bat

--- install/windows_install.bat
+++ install/windows_install.bat
@@ -7,8 +7,11 @@
 @ echo Sourcing windows_install.bat
 @ echo off

-:: TODO: setup a
-:: cmd.exe /K C:\path\to\file.cmd
+:: TODO: User must create a shortcut on desktop
+
+:: target: %windir%\system32\cmd.exe /K Z:\workspace\jdulmer\dotfiles\install\windows_install.bat
+:: Start In: Z:\workspace\jdulmer
+:: Shortcut Key: ctrl+alt+t

 :: Environmental Variables
 SET WORKSPACE="Z:\workspace\jdulmer"


Delete msci_world.bat

Delete msci_world.bat

--- scripts/analysis/msci_world.bat
+++ scripts/analysis/msci_world.bat
@@ -1,3 +0,0 @@
-REM London Stock Exchange (LSE) : SRCE MSCI WORLD ETF price (MXWO), Currency USD
-call analysis.bat -data_service_type "time-series" -equity_dataset "LSE" -ticker_symbol "MXWO" -opening_funds 10000
-exit


added ci script

added ci script

error: pathspec 'script/csharp.bat' did not match any file(s) known to git

--- script/csharp.bat
+++ script/csharp.bat
@@ -0,0 +1,6 @@
+call mvn dependency:get -DrepoUrl=https://oss.sonatype.org/content/repositories/snapshots -Dartifact=com.hazelcast:hazelcast:3.4-SNAPSHOT -Ddest=hazelcast.jar
+start "hazelcast" java -cp hazelcast.jar com.hazelcast.core.server.StartServer
+ping -n 10 127.0.0.1 >nul
+nunit-console /xml:"console-text.xml" "Hazelcast.Test/Hazelcast.Test.nunit"
+ping -n 10 127.0.0.1 >nul
+taskkill /F /FI "WINDOWTITLE eq hazelcast"


Fix VBox Guest Additions install

Fix VBox Guest Additions install

It seems like some changes broke the path where the VirtualBox Guest
Additions were installed via a mounted CD from the Host OS. The changes
look like copy and paste errors from the downloaded ISO path. This
change fixes the paths to be correct.

--- script/vmtool.bat
+++ script/vmtool.bat
@@ -186,7 +186,8 @@
 mkdir "%VBOX_ISO_DIR%"
 pushd "%VBOX_ISO_DIR%"
 set VBOX_SETUP_PATH=
-@for %%i in (%PACKER_SEARCH_PATHS%) do @if not defined VBOX_SETUP_PATH @if exist "%%~i\%VBOX_SETUP_EXE%" set VBOX_SETUP_PATH=%%~i\%VBOX_SETUP_EXE%
+set VBOX_SETUP_DIR=
+@for %%i in (%PACKER_SEARCH_PATHS%) do @if not defined VBOX_SETUP_PATH @if exist "%%~i\%VBOX_SETUP_EXE%" (set VBOX_SETUP_PATH=%%~i\%VBOX_SETUP_EXE% & set VBOX_SETUP_DIR=%%~i)
 if defined VBOX_SETUP_PATH goto install_vbox_guest_additions

 @for %%i in (%PACKER_SEARCH_PATHS%) do @if exist "%%~i\%VBOX_ISO%" set VBOX_ISO_PATH=%%~i\%VBOX_ISO%
@@ -216,7 +217,7 @@

 :install_vbox_guest_additions
 echo ==^> Installing Oracle certificate to keep install silent
-powershell -Command "Get-ChildItem %VBOX_ISO_DIR%\cert\ -Filter vbox*.cer | ForEach-Object { %VBOX_ISO_DIR%\cert\VBoxCertUtil.exe add-trusted-publisher $_.FullName --root $_.FullName }" <NUL
+powershell -Command "Get-ChildItem %VBOX_SETUP_DIR%\cert\ -Filter vbox*.cer | ForEach-Object { %VBOX_SETUP_DIR%\cert\VBoxCertUtil.exe add-trusted-publisher $_.FullName --root $_.FullName }" <NUL
 echo ==^> Installing VirtualBox Guest Additions
 "%VBOX_SETUP_PATH%" /S
 @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: "%VBOX_SETUP_PATH%" /S


* missed change

* missed change

git-svn-id: e4e5150cbaae966e82617adf20e509dfc2de7bc3@50 c83cf141-d9d7-4975-98f5-23f3ee83e49f

--- Scripts/svn_externals_list.bat
+++ Scripts/svn_externals_list.bat
@@ -157,7 +157,13 @@
   )
 ) else call :IMPL

-exit /b
+(
+  endlocal
+  rem restore chcp variables
+  set "CURRENT_CP=%CURRENT_CP%"
+  set "LAST_CP=%LAST_CP%"
+  exit /b
+)

 :IMPL
 if %FLAG_OFFLINE% EQU 0 goto IGNORE_WC_DB


Added a source command for using debug functions in this library from an outside script. Moved the most common initializations into :Library.Init.

--- Batch/Library.bat
+++ Batch/Library.bat
@@ -5,7 +5,7 @@
 :#                                                                            #
 :#  Description     A library of useful batch routines for Windows NT cmd.exe #
 :#                                                                            #
-:#  Notes 	    Used this file as a template for new batch files:         #
+:#  Notes 	    Use this file as a template for new batch files:          #
 :#                  Copy this whole file into the new batch file.             #
 :#                  Remove all unused code (possibly everything) from the end #
 :#                  of the debugging library to the header of the main routine#
@@ -185,6 +185,9 @@
 :#		    to the :PopArg section, where they're now needed first.   #
 :#		    Added routine :Prep2ExpandVars allowing to pass any       #
 :#		    tricky string across call or endlocal barriers.           #
+:#   2016-12-07 JFL Added a source command for using debug functions in this  #
+:#		    library from an outside script.                           #
+:#   2016-12-08 JFL Moved the most common initializations into :Library.Init. #
 :#		                                                              #
 :#          Copyright 2016 Hewlett Packard Enterprise Development LP         #
 :# Licensed under the Apache 2.0 license  www.apache.org/licenses/LICENSE-2.0 #
@@ -195,27 +198,34 @@
 if not "%OS%"=="Windows_NT"     goto Err9X
 ver | find "Windows NT" >NUL && goto ErrNT

+:# Mechanism for calling subroutines in this library, either locally or from another script.
+:# Called by (%LCALL% :label [arguments]), with LCALL defined in the Call module below.
+if '%1'=='call' %*& exit /b
+
 setlocal EnableExtensions EnableDelayedExpansion
-set "VERSION=2016-11-23"
-set "SCRIPT=%~nx0"
-set "SPATH=%~dp0" & set "SPATH=!SPATH:~0,-1!"
-set "ARG0=%~f0"
-set "ARGS=%*"
-
-:# Mechanism for calling subroutines in a second external script instance.
-:# Done by %XCALL% :label [arguments]
-if '%1'=='-call' !ARGS:~1! & exit /b
-set XCALL=call "%ARG0%" -call
-
-:# FOREACHLINE macro. (Change the delimiter to none to catch the whole lines.)
-set FOREACHLINE=for /f "delims="
-
-:# Default definitions
-call :PopArg.Init
-call :Macro.Init
-call :Debug.Init
-call :Exec.Init
-if not defined HOME set "HOME=%HOMEDRIVE%%HOMEPATH%"
+set "VERSION=2016-12-08"
+set "SCRIPT=%~nx0"				&:# Script name
+set "SPATH=%~dp0" & set "SPATH=!SPATH:~0,-1!"	&:# Script path, without the trailing \
+set  "ARG0=%~f0"				&:# Script full pathname
+set ^"ARGS=%*^"					&:# Argument line
+
+:# Mechanism for calling subroutines in a second instance of a script, from its main instance.
+:# Done by (%XCALL% :label [arguments]), with XCALL defined in the Call module below.
+if '%1'=='-call' !ARGS:~1!& exit /b
+
+:# Mechanism for "sourcing" this library from another script.
+if '%1'=='source' (
+  endlocal &:# Define everything in the context of the caller script
+  if not "!!"=="" >&2 echo "%ARG0%" %1 Error: Must be called with DelayedExpansion ENABLED. & exit /b 1
+  set ^"LCALL=call "%ARG0%" call^"	&rem :# This is this library's ARG0
+) &:# Now initialize the library modules, then return to the parent script.
+
+:# Initialize the most commonly used library components.
+call :Library.Init
+
+if '%1'=='source' exit /b 0	&:# If we're sourcing this lib, we're done.
+
+:# Go process command-line arguments
 goto Main

 :Err9X
@@ -228,22 +238,64 @@

 :#----------------------------------------------------------------------------#
 :#                                                                            #
-:#  Function        PopArg                                                    #
-:#                                                                            #
-:#  Description     Pop the first argument from %ARGS% into %ARG% and %"ARG"% #
-:#                                                                            #
-:#  Macros          %POPARG%        Pop one argument                          #
-:#                  %POPSARG%       Faster version, not supporting ! or ^ val.#
-:#                                                                            #
-:#  Input           %ARGS%	    Command line arguments                    #
-:#                                                                            #
-:#  Output          %ARG%           The unquoted argument                     #
+:#  Function	    Library.Init					      #
+:#                                                                            #
+:#  Description     Initialize the most commonly used library components      #
+:#                                                                            #
+:#----------------------------------------------------------------------------#
+
+:Library.Init
+:# Initialize this library modules definitions.
+:# Each one depends on the preceding ones, so if you need one, you need all the preceding ones as well.
+call :Call.Init			&:# Function calls and argument extraction
+call :Macro.Init		&:# Inline macros generation
+call :Debug.Init		&:# Debug routines
+call :Exec.Init			&:# Conditional execution routines
+
+:# FOREACHLINE macro. (Changes the delimiter to none to catch the whole lines.)
+set FOREACHLINE=for /f "delims="
+
+:# HOME variable. For analogy with Unix systems.
+if not defined HOME set "HOME=%HOMEDRIVE%%HOMEPATH%"
+
+goto :eof
+
+:#----------------------------------------------------------------------------#
+:#                                                                            #
+:#  Module	    Call						      #
+:#                                                                            #
+:#  Description     Manage function calls and argument extraction             #
+:#                                                                            #
+:#  Functions	    PopArg          Pop the first argument from %ARGS% into   #
+:#				     %ARG% and %"ARG"%			      #
+:#		    PopSimpleArg    Simpler and faster version, incompatible  #
+:#                                   with ! or ^ characters in ARG values.    #
+:#		    Prep2ExpandVars Prepare variables to return from the      #
+:#		 		    local scope (with expansion on or off)    #
+:#				    to a parent scope with expansion on.      #
+:#		    PrepArgVars     Prepare variables containing pathnames    #
+:#				    that will be passed as arguments.	      #
+:#                                                                            #
+:#  Macros	    %POPARG%        Pop one argument using :PopArg            #
+:#                  %POPSARG%       Pop one argument using :PopSimpleArg      #
+:#                  %LCALL%         Call a routine in this library, either    #
+:#                                   locally, or from an outside script.      #
+:#                  %XCALL%         Call an outside script routine, from      #
+:#                                   another instance of that outside script. #
+:#                  %XCALL@%        Idem, but with all args stored in one var.#
+:#                                                                            #
+:#  Variables	    %ARG%           The unquoted argument                     #
 :#                  %"ARG"%         The actual argument, possibly quoted      #
 :#                  %ARGS%	    Remaining command line arguments          #
 :#                                                                            #
-:#  Notes 	    Works around the defect of the shift command, which       #
-:#                  pops the first argument from the %* list, but does not    #
-:#                  remove it from %*.                                        #
+:#                  %CR%            An ASCII Carrier Return character '\x0D'  #
+:#                  %LF%            An ASCII Line Feed character '\x0A'       #
+:#                  %BS%            An ASCII Back Space character '\x08'      #
+:#                  %FF%            An ASCII Form Feed character '\x0C'       #
+:#                                                                            #
+:#  Notes 	    PopArg works around the defect of the shift command,      #
+:#                  which pops the first argument from the %* list, but does  #
+:#                  not remove it from %*.                                    #
 :#                  Also works around another defect with tricky characters   #
 :#                  like ! or ^ being lost when variable expansion is on.     #
 :#                                                                            #
@@ -254,7 +306,7 @@
 :#                  If you're sure that NONE of the arguments contain such    #
 :#                  tricky characters, then call :PopSimpleArg.               #
 :#                                                                            #
-:#                  Use an inner call to make sure the argument parsing is    #
+:#                  Uses an inner call to make sure the argument parsing is   #
 :#                  done by the actual cmd.exe parser. This guaranties that   #
 :#                  arguments are split exactly as shift would have done.     #
 :#                                                                            #
@@ -271,9 +323,8 @@
 :#                  To do: Detect if the last arg has mismatched quotes, and  #
 :#                  if it does, append one.                                   #
 :#                  Right now such mismatched quotes will cause an error here.#
-:#                  It is easily feasible to work around this, but this is    #
-:#                  useless as passing back an invalid argument like this     #
-:#                  will only cause more errors further down.                 #
+:#                  Do not work around this error to only pass back the bad   #
+:#                  argument, as this will only cause more errors further down#
 :#                                                                            #
 :#  History                                                                   #
 :#   2015-04-03 JFL Bug fix: Quoted args with an & inside failed to be poped. #
@@ -286,15 +337,21 @@
 :#		    called %POPSARG%.                                         #
 :#		    Added routine :Prep2ExpandVars allowing to pass any       #
 :#		    tricky string across call or endlocal barriers.           #
-:#                                                                            #
-:#----------------------------------------------------------------------------#
-
-call :PopArg.Init
-goto PopArg.end
-
-:PopArg.Init
-set "POPARG=call :PopArg"
-set "POPSARG=call :PopSimpleArg"
+:#   2016-12-01 JFL Added a %FF% Form Feed character variable.                #
+:#                                                                            #
+:#----------------------------------------------------------------------------#
+
+call :Call.Init
+goto Call.end
+
+:Call.Init
+if not defined LCALL set "LCALL=call"	&:# Macro to call functions in this library
+set "POPARG=%LCALL% :PopArg"
+set "POPSARG=%LCALL% :PopSimpleArg"
+
+:# Mechanism for calling subroutines in a second external instance of the top script.
+set ^"XCALL=call "!ARG0!" -call^"	&:# This is the top script's (or this lib's if called directly) ARG0
+set ^"XCALL@=!XCALL! :CallVar^"		&:# Indirect call, with the label and arguments in a variable

 :# Define a LF variable containing a Line Feed ('\x0A')
 set LF=^
@@ -310,7 +367,10 @@
 :# Then extract the first backspace
 set "BS=%DEL:~0,1%"

-:# Define variables for problematic characters, that cause parsing issues
+:# Define a FF variable containing a Form Feed ('\x0C')
+for /f %%A in ('cls') do set "FF=%%A"
+
+:# Define variables for problematic characters, that cause parsing issues.
 :# Use the ASCII control character name, or the html entity name.
 :# Warning: The excl and hat characters need different quoting depending on context.
 set  "DEBUG.percnt=%%"	&:# One percent sign
@@ -333,12 +393,13 @@
 set  "DEBUG.cr=!CR!"	&:# One carrier return
 set  "DEBUG.lf=!LF!"	&:# One line feed
 set  "DEBUG.bs=!BS!"	&:# One backspace
+set  "DEBUG.ff=!FF!"	&:# One form feed
 goto :eof

 :PopArg
 if "!!"=="" goto :PopArg.Eon
 :PopArg.Eoff
-:PopSimpleArg
+:PopSimpleArg :# Will corrupt result if expansion is on and ARG contains ^ or ! characters.
 :# Gotcha: The call parser first scans its command line for an unquoted /?.
 :# If it finds one anywhere on the command line, then it ignores the target label and displays call help.
 :# To work around that, we initialize %ARG% and %"ARG"% with an impossible combination of values.
@@ -420,11 +481,16 @@
 if not [%2]==[] shift & goto :PrepArgVars
 goto :eof

-:PopArg.end
-
-:#----------------------------------------------------------------------------#
-:#                                                                            #
-:#  Function        Inline macro functions                                    #
+:# Indirect call, with the label and arguments in a variable
+:CallVar CMDVAR
+call !%1:%%=%%%%!
+exit /b
+
+:Call.end
+
+:#----------------------------------------------------------------------------#
+:#                                                                            #
+:#  Module          Macro						      #
 :#                                                                            #
 :#  Description     Tools for defining inline functions,                      #
 :#                  also known as macros by analogy with Unix shells macros   #
@@ -432,7 +498,7 @@
 :#  Macros          %MACRO%         Define the prolog code of a macro         #
 :#                  %/MACRO%        Define the epilog code of a macro         #
 :#                                                                            #
-:#  Variables       %LF%            A Line Feed ASCII character '\x0A'        #
+:#  Variables       %LF1%           A Line Feed ASCII character '\x0A'        #
 :#                  %LF2%           Generates a LF when expanded twice        #
 :#                  %LF3%           Generates a LF when expanded 3 times      #
 :#                                  Etc...                                    #
@@ -542,7 +608,7 @@

 :#----------------------------------------------------------------------------#
 :#                                                                            #
-:#  Function        Debug routines					      #
+:#  Module	    Debug						      #
 :#                                                                            #
 :#  Description     A collection of debug routines                            #
 :#                                                                            #
@@ -670,8 +736,8 @@
 if exist echo >&2 echo WARNING: The file "echo" in the current directory will cause problems. Please delete it and retry.
 :# Inherited variables from the caller: DEBUG, VERBOSE, INDENT, >DEBUGOUT
 :# Initialize other debug variables
-set "ECHO=call :Echo"
-set "ECHOVARS=call :EchoVars"
+set "ECHO=%LCALL% :Echo"
+set "ECHOVARS=%LCALL% :EchoVars"
 :# The FUNCTION, UPVAR, and RETURN macros should work with delayed expansion on or off
 set MACRO.GETEXP=(if "%'!2%%'!2%"=="" (set MACRO.EXP=EnableDelayedExpansion) else set MACRO.EXP=DisableDelayedExpansion)
 set UPVAR=call set DEBUG.RETVARS=%%DEBUG.RETVARS%%
@@ -703,7 +769,7 @@
       if defined ^^%>%DEBUGOUT ( %# If we use a debugging stream distinct from stdout #% %\n%
 	call :Echo.Eval2DebugOut %!%DEBUG.MSG%!%%# Use a helper routine, as delayed redirection does not work #%%\n%
       ) else ( %# Output directly here, which is faster #% %\n%
-	for /f "delims=" %%c in ("%'!%INDENT%'!%%'!%DEBUG.MSG%'!%") do echo %%c%# Use a for loop to do a double !variable! expansion #% %\n%
+	for /f "delims=" %%c in ("%'!%INDENT%'!%%'!%DEBUG.MSG%'!%") do echo %%c%# Use a for loop to do a double !variable! expansion #%%\n%
       ) %\n%
       if defined LOGFILE ( %# If we have to send a copy to a log file #% %\n%
 	call :Echo.Eval2LogFile %!%DEBUG.MSG%!%%# Use a helper routine, as delayed redirection does not work #%%\n%
@@ -733,15 +799,15 @@
   ) %\n%
 ) %/MACRO%
 :Debug.Init.2
-set "LOG=call :Echo.Log"
+set "LOG=%LCALL% :Echo.Log"
 set ">>LOGFILE=>>%LOGFILE%"
 if not defined LOGFILE set "LOG=rem" & set ">>LOGFILE=rem"
 if .%LOGFILE%.==.NUL. set "LOG=rem" & set ">>LOGFILE=rem"
 if .%NOREDIR%.==.1. set "LOG=rem" & set ">>LOGFILE=rem" &:# A parent script is already redirecting output. Trying to do it again here would fail.
-set "ECHO.V=call :Echo.Verbose"
-set "ECHO.D=call :Echo.Debug"
-set "ECHOVARS.V=call :EchoVars.Verbose"
-set "ECHOVARS.D=call :EchoVars.Debug"
+set "ECHO.V=%LCALL% :Echo.Verbose"
+set "ECHO.D=%LCALL% :Echo.Debug"
+set "ECHOVARS.V=%LCALL% :EchoVars.Verbose"
+set "ECHOVARS.D=%LCALL% :EchoVars.Debug"
 :# Variables inherited from the caller...
 :# Preserve INDENT if it contains just spaces, else clear it.
 for /f %%s in ('echo.%INDENT%') do set "INDENT="
@@ -767,7 +833,7 @@
 set FUNCTION=%MACRO.GETEXP% %&% %MACRO% ( %\n%
   call set "FUNCTION.NAME=%%0" %\n%
   call set ARGS=%%*%# Do not quote this, to keep string/non string aternance #%%\n%
-  set ARGS=%!%ARGS:^^^^^^^^^^^^^^^^=^^^^^^^^%!%%# ^carets are doubled in quoted strings, halved outside. => Quadruple them if using unquoted ones #%%\n%
+  if defined ARGS set ARGS=%!%ARGS:^^^^^^^^^^^^^^^^=^^^^^^^^%!%%# ^carets are doubled in quoted strings, halved outside. => Quadruple them if using unquoted ones #%%\n%
   set "DEBUG.RETVARS=" %\n%
   if not defined MACRO.ARGS set "MACRO.ARGS=%'!%MACRO.EXP%'!%" %\n%
   setlocal %!%MACRO.ARGS%!% %\n%
@@ -789,11 +855,11 @@
 set "DEBUG=1"
 set "DEBUG.ENTRY=:Debug.Entry"
 set "IF_DEBUG=if .%DEBUG%.==.1."
-set "FUNCTION0=call call :Debug.Entry0 %%0 %%*"
+set "FUNCTION0=%LCALL% call :Debug.Entry0 %%0 %%*"
 set FUNCTION=%MACRO.GETEXP% %&% %MACRO% ( %\n%
   call set "FUNCTION.NAME=%%0" %\n%
   call set ARGS=%%*%# Do not quote this, to keep string/non string aternance #%%\n%
-  set ARGS=%!%ARGS:^^^^^^^^^^^^^^^^=^^^^^^^^%!%%# ^carets are doubled in quoted strings, halved outside. => Quadruple them if using unquoted ones #%%\n%
+  if defined ARGS set ARGS=%!%ARGS:^^^^^^^^^^^^^^^^=^^^^^^^^%!%%# ^carets are doubled in quoted strings, halved outside. => Quadruple them if using unquoted ones #%%\n%
   if %!%DEBUG%!%==1 ( %# Build the debug message and display it #% %\n%
     if defined ^^%>%DEBUGOUT ( %# If we use a debugging stream distinct from stdout #% %\n%
       call :Echo.2DebugOut call %!%FUNCTION.NAME%!% %!%ARGS:%%=%%%%%!%%# Use a helper routine, as delayed redirection does not work #%%\n%
@@ -809,7 +875,7 @@
   if not defined MACRO.ARGS set "MACRO.ARGS=%'!%MACRO.EXP%'!%" %\n%
   setlocal %!%MACRO.ARGS%!% %\n%
 ) %/MACRO%
-set "RETURN0=call :Debug.Return0 & exit /b"
+set "RETURN0=%LCALL% :Debug.Return0 & exit /b"
 :# Macro for displaying comments on the return log line
 set RETURN#=set "RETURN#ERR=%'!%ERRORLEVEL%'!%" %&% %MACRO% ( %\n%
   set RETVAL=%!%MACRO.ARGS:~1%!%%\n%
@@ -820,8 +886,8 @@
 set "EXEC.ARGS=%EXEC.ARGS: -d=% -d"
 set "EXEC.ARGS=%EXEC.ARGS:~1%"
 :# Reverse the above optimization
-set "ECHO.D=call :Echo.Debug"
-set "ECHOVARS.D=call :EchoVars.Debug"
+set "ECHO.D=%LCALL% :Echo.Debug"
+set "ECHOVARS.D=%LCALL% :EchoVars.Debug"
 goto :eof

 :Debug.Entry0
@@ -869,8 +935,8 @@
 set "EXEC.ARGS=%EXEC.ARGS: -v=% -v"
 set "EXEC.ARGS=%EXEC.ARGS:~1%"
 :# Reverse the above optimization
-set "ECHO.V=call :Echo.Verbose"
-set "ECHOVARS.V=call :EchoVars.Verbose"
+set "ECHO.V=%LCALL% :Echo.Verbose"
+set "ECHOVARS.V=%LCALL% :EchoVars.Verbose"
 goto :eof

 :# Echo and log a string, indented at the same level as the debug output.
@@ -953,7 +1019,7 @@

 :#----------------------------------------------------------------------------#
 :#                                                                            #
-:#  Function        Exec                                                      #
+:#  Module	    Exec                                                      #
 :#                                                                            #
 :#  Description     Run a command, logging its output to the log file.        #
 :#                                                                            #
@@ -961,7 +1027,14 @@
 :#                  In DEBUG mode, display the command line and the exit code.#
 :#                  In NOEXEC mode, display the command line, but don't run it.
 :#                                                                            #
-:#  Arguments       -L          Do not send the output to the log file.       #
+:#  Functions       Exec.Init	Initialize Exec routines. Call once at 1st    #
+:#                  Exec.Off	Disable execution of commands		      #
+:#                  Exec.On	Enable execution of commands		      #
+:#                  Do          Always execute a command, logging its output  #
+:#                  Exec	Conditionally execute a command, logging it.  #
+:#                  Exec.SetErrorLevel	Change the current ERRORLEVEL	      #
+:#                                                                            #
+:#  Exec Arguments  -L          Do not send the output to the log file.       #
 :#                  -t          Tee all output to the log file if there's a   #
 :#                              usable tee.exe. Default: Redirect all >> log. #
 :#                              Known limitation: The exit code is always 0.  #
@@ -972,13 +1045,6 @@
 :#                              Note: Quote redirections, NOT file numbers.   #
 :#                              Ex: 2">&"1 will work; "2>&1" will NOT work.   #
 :#                                                                            #
-:#  Functions       Exec.Init	Initialize Exec routines. Call once at 1st    #
-:#                  Exec.Off	Disable execution of commands		      #
-:#                  Exec.On	Enable execution of commands		      #
-:#                  Do          Always execute a command, logging its output  #
-:#                  Exec	Conditionally execute a command, logging it.  #
-:#                  Exec.SetErrorLevel	Change the current ERRORLEVEL	      #
-:#                                                                            #
 :#  Macros          %DO%        Always execute a command, logging its output  #
 :#                  %EXEC%      Conditionally execute a command, logging it.  #
 :#                  %ECHO.X%    Echo a string indented in -X mode, and log it.#
@@ -988,8 +1054,11 @@
 :#                              %EXEC% can't be used, like in for ('cmd') ... #
 :#                  %IF_EXEC%   Execute a command if _not_ in NOEXEC mode     #
 :#                  %IF_NOEXEC% Execute a command in NOEXEC mode only         #
-:#                  %DOECHO%    Echo and run a command. No logging.           #
-:#                  %DOECHO.D%  Idem, echoing it in debug mode only.          #
+:#                  %_DO%       Echo and run a command. No opts. No logging.  #
+:#                  %_DO.D%     Idem, echoing it in debug mode only.          #
+:#                  %XEXEC%     Call :Exec from an external scriptlet, such   #
+:#                               one in a (for /f in ('commands')) block.     #
+:#                  %XEXEC@%    Idem, but with all args stored in one var.    #
 :#                                                                            #
 :#  Variables       %NOEXEC%	Exec mode. 0=Execute commands; 1=Don't. Use   #
 :#                              functions Exec.Off and Exec.On to change it.  #
@@ -1034,7 +1103,7 @@
 :#		    method lost non-white batch argument separators = , ; in  #
 :#		    some cases.)                                              #
 :#   2016-11-24 JFL Fixed executing commands containing a ^ character.        #
-:#		    Added routine :DoEcho.                                    #
+:#		    Added routine :_Do.                                       #
 :#		                                                              #
 :#----------------------------------------------------------------------------#

@@ -1043,15 +1112,16 @@

 :# Global variables initialization, to be called first in the main routine
 :Exec.Init
-set "DO=call :Do"
-set "EXEC=call :Exec"
-set "DOECHO=call :DoEcho"
-set "DOECHO.D=call :DoEcho.D"
-set "ECHO.X=call :Echo.X"
-set "ECHO.XD=call :Echo.XD"
-set "ECHO.XVD=call :Echo.XVD"
+set "DO=%LCALL% :Do"
+set "EXEC=%LCALL% :Exec"
+set "_DO=%LCALL% :_Do"
+set "_DO.D=%LCALL% :_Do.D"
+set "ECHO.X=%LCALL% :Echo.X"
+set "ECHO.XD=%LCALL% :Echo.XD"
+set "ECHO.XVD=%LCALL% :Echo.XVD"
 if not .%NOEXEC%.==.1. set "NOEXEC=0"
-set "XCALL@=%XCALL% :Exec.CallVar"
+:# Execute commands
+set "XEXEC=%XCALL% :Exec"
 set "XEXEC@=%XCALL% :Exec.ExecVar"
 :# Check if there's a tee.exe program available
 set "Exec.HaveTee=0"
@@ -1186,22 +1256,18 @@
   exit /b %%e
 )

-:Exec.CallVar CMDVAR
-call !%1:%%=%%%%!
-exit /b
-
 :Exec.ExecVar CMDVAR
 call :Exec !%1:%%=%%%%!
 exit /b

 :# Echo a command, then run it as it is.
-:DoEcho
+:_Do
 %ECHO% %*
 %*
 goto :eof

 :# Echo a command in debug mode, then run it as it is.
-:DoEcho.D
+:_Do.D
 %>DEBUGOUT% %ECHO.D% %*
 %*
 goto :eof
@@ -1231,6 +1297,9 @@
 for /F "tokens=1 delims=#" %%a in ('"prompt #$H# & echo on & for %%b in (1) do rem"') do set "DEL=%%a"
 :# Then extract the first backspace
 set "BS=%DEL:~0,1%"
+
+:# Define a FF variable containing a Form Feed ('\x0C')
+for /f %%A in ('cls') do set "FF=%%A"

 :#----------------------------------------------------------------------------#
 :#  Useful tricks
@@ -2564,16 +2633,16 @@

 :# Under NT, save the initial code page, and change it to Windows 1252 code page.
 :chcp
-if not "%OS%"=="Windows_NT" goto skipchcp
+:# if not "%OS%"=="Windows_NT" goto :eof
 for /f "tokens=2 delims=:" %%n in ('chcp') do set OLDCP=%%n
 chcp 1252
-:skipchcp
+goto :eof

 :# Restore the initial code page
 :rscp
-if not "%OS%"=="Windows_NT" goto skiprscp
+:# if not "%OS%"=="Windows_NT" goto :eof
 chcp %OLDCP%
-:skiprscp
+goto :eof

 :#----------------------------------------------------------------------------#
 :#                                                                            #
@@ -3762,47 +3831,58 @@
 set "STRING1=@(()),,;;  %%%%^!^!**??[[]]==~~''""%%CD%%_^!CD^!" &:# Remove ||&&^^<<>> that cause problems when not quoted
 set STRING=!STRING1! "!STRING0!"
 set STRING
+@echo on
 call :testC2 !STRING:%%=%%%%!
 %RETURN%

 :testC2
-%DOECHO% setlocal DisableDelayedExpansion
+@echo off
+echo :# First show what a normal call lets go through
+%_DO% setlocal DisableDelayedExpansion
+@echo on
 set ARGLINE=%*
-set ARGLINE
 set ARG#1=%1
 set ARG#2=%2
 set ARG#3=%3
 set ARG#4=%4
+@echo off
+set ARGLINE
 set ARG#

 %ECHO% :# Idem with initial ^^caret
+@echo on
 set ^"ARGLINE=%*^"
+set ^"ARG#1=%1^" &:# yes
+set ^"ARG#2=%2^"
+set ^"ARG#3=%3^"
+set ^"ARG#4=%4^"
+@echo off
 set ARGLINE
-set ^"ARG#1=%1^" &:# yes
-set ^"ARG#2=%2^" & echo {%ARG#1%}
-set ^"ARG#3=%3^" & echo {%ARG#2%}
-set ^"ARG#4=%4^"
 set ARG#
-
+echo echo ARG#1={%ARG#1%}
+echo echo ARG#2={%ARG#2%}
 endlocal

-%DOECHO% setlocal EnableDelayedExpansion
+%_DO% setlocal EnableDelayedExpansion
+@echo on
 set ^"ARGLINE=%*^"
-set ARGLINE
 set ARG#1=%1
 set ARG#2=%2
 set ARG#3=%3
 set ARG#4=%4
+set ARGLINE
+@echo off
 set ARG#
 endlocal

+echo :# Now show what this library FUNCTIONS can do!
 %FUNCTION% EnableDelayedExpansion
 set ARGS
 set "STRING0="
 set "STRING1="
 set "STRING=!ARGS!"
 set STRING
-%DOECHO% setlocal DisableDelayedExpansion
+%_DO% setlocal DisableDelayedExpansion
 %POPARG%
 %ECHOVARS% ARG ^""ARG"^"
 %POPARG%
@@ -3813,7 +3893,7 @@
 %ECHOVARS% ARG ^""ARG"^"
 endlocal

-%DOECHO% setlocal EnableDelayedExpansion
+%_DO% setlocal EnableDelayedExpansion
 set ARGS=!STRING!
 %POPARG%
 %ECHOVARS% ARG ^""ARG"^"


script fix

script fix

--- script/after-release-pull-request.bat
+++ script/after-release-pull-request.bat
@@ -16,7 +16,7 @@
 echo.
 echo.
 echo Merge release branch to master
-git merge --no-off release-%release_branch%
+git merge --no-ff release-%release_branch%
 echo.
 echo.
 echo Create a tag of this version on master branch


Create start.bat

Create start.bat

error: pathspec 'Bats/start.bat' did not match any file(s) known to git

--- Bats/start.bat
+++ Bats/start.bat
@@ -0,0 +1 @@
+start /high C:\"Program Files (x86)"\"Microsoft Visual FoxPro 9"\vfp9.exe %1 %2 %3 %4 %5 %6


build

build

--- build.bat
+++ build.bat
@@ -19,7 +19,7 @@
 REM variables
 rem EDIT: set your msbuild for local debug
 rem set msbuild="c:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\MSBuild\15.0\Bin\MSBuild.exe"
-set msbuild="%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
+set msbuild="c:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"

 if "%nuget%" == "" (
   set nuget="c:\nuget\nuget.exe"


Ignore version (and add licence header).

--- build.bat
+++ build.bat
@@ -1,9 +1,28 @@
+rem  Licensed to the Symphony Software Foundation (SSF) under one
+rem  or more contributor license agreements.  See the NOTICE file
+rem  distributed with this work for additional information
+rem  regarding copyright ownership.  The SSF licenses this file
+rem  to you under the Apache License, Version 2.0 (the
+rem  "License"); you may not use this file except in compliance
+rem  with the License.  You may obtain a copy of the License at
+rem
+rem  http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem  Unless required by applicable law or agreed to in writing,
+rem  software distributed under the License is distributed on an
+rem  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem  KIND, either express or implied.  See the License for the
+rem  specific language governing permissions and limitations
+rem  under the License.
+
 @echo Off
+
 set config=%1
 if "%config%" == "" (
   set config=Release
 )

+REM Version currently ignored
 set version=
 if not "%PackageVersion%" == "" (
   set version=-Version %PackageVersion%
@@ -19,4 +38,4 @@
 "%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" RestApiClient.sln /p:Configuration="%config%" /m /v:M /nr:false /t:Rebuild

 REM Package
-call %nuget% pack "src\SymphonyOSS.RestApiClient\SymphonyOSS.RestApiClient.csproj" -symbols -p Configuration=%config% %version%
+call %nuget% pack "src\SymphonyOSS.RestApiClient\SymphonyOSS.RestApiClient.csproj" -symbols -p Configuration=%config%


Adding nuget restore for CI.

Adding nuget restore for CI.

--- build.bat
+++ build.bat
@@ -1 +1,3 @@
-msbuild SlimMessageBus.sln /t:Clean;Build /p:Platform="Any CPU" /p:Configuration=Release+set sln_file=SlimMessageBus.sln
+nuget.exe restore %sln_file%
+msbuild %sln_file% /t:Clean;Build /p:Platform="Any CPU" /p:Configuration=Release


Add a convenient script to build the project

...because I'm too lazy to open VS and I always forget how to manually
launch msbuild.

error: pathspec 'build.bat' did not match any file(s) known to git

--- build.bat
+++ build.bat
@@ -0,0 +1,25 @@
+@ECHO OFF
+
+IF #%1 == # GOTO :fullRebuild
+IF #%1 == #compile GOTO :compile
+IF #%1 == #clean GOTO :clean
+IF #%1 == #rebuild GOTO :fullRebuild
+GOTO :options
+
+:options
+ECHO Usage: %0 ^(compile^|clean^|rebuild^)
+EXIT 255
+
+:fullRebuild
+msbuild /property:Configuration=Release /property:Platform=x64 /target:Clean
+msbuild /property:Configuration=Release /property:Platform=Win32 /target:Clean
+GOTO :compile
+
+:compile
+msbuild /property:Configuration=Release /property:Platform=x64 && msbuild /property:Configuration=Release /property:Platform=Win32
+GOTO :EOF
+
+:clean
+msbuild /property:Configuration=Release /property:Platform=x64 /target:Clean
+msbuild /property:Configuration=Release /property:Platform=Win32 /target:Clean
+GOTO :EOF


Still attempting to get assemblyinfo patched with version number

--- build.bat
+++ build.bat
@@ -12,7 +12,8 @@
 if not "%GitVersion.ClassicVersion%" == "" (
     REM override version number with the one provided by git
     set version=%GitVersion.ClassicVersion%
-    call %GitVersion% /exec /updateassemblyinfo
+    REM patch assemblyinfo with this version number
+    call %GitVersion% /updateassemblyinfo "properties\assemblyinfo.cs"
 )

 set nuget=


NuGet pack

NuGet pack

--- build.bat
+++ build.bat
@@ -20,7 +20,7 @@

 REM Package
 mkdir Build
-call "%nuget%" pack "Source\Devsense.PHP.Parser\Devsense.PHP.Parser.nuspec" %version%
+call "%nuget%" pack "Source\Devsense.PHP.Parser\Devsense.PHP.Parser.nuspec" -o Build -p Configuration=%config% %version%
 if not "%errorlevel%"=="0" goto failure

 :success


Bumping version number

Bumping version number

--- build.cmd
+++ build.cmd
@@ -4,7 +4,7 @@
    set config=Release
 )

-set version=0.1.4
+set version=0.1.4-PRE
 if not "%PackageVersion%" == "" (
    set version=%PackageVersion%
 )


GPII-177: Updated install script to checkout v0.2 of universal

--- build.cmd
+++ build.cmd
@@ -10,9 +10,8 @@

 if not exist ..\node_modules\universal (
     cd ..\node_modules
-    git clone git://github.com/GPII/universal.git
+    git clone git://github.com/GPII/universal.git -b v0.2
     cd universal
-    git checkout tags/v0.1
     npm install
     cd ..\..\windows
 )


Removed

Removed

--- build.cmd
+++ build.cmd
@@ -1,20 +0,0 @@
-@echo off
-
-REM Encoding fix - see http://stackoverflow.com/questions/13146420/my-jekyll-site-cant-build-liquid-exception-incompatible-character-encodings
-chcp 65001
-
-:start
-	cls
-	call jekyll build
-	echo Hit return to build again
-	echo Ctrl-C to quid
-
-pause
-goto start
-
-:theEnd
-echo Bye!
-
-
-
-


Removed download of local NuGet.exe copy and cleaned up formatting in build.cmd.

--- build.cmd
+++ build.cmd
@@ -1,46 +1,33 @@
-@echo off
-pushd %~dp0
+@ECHO OFF

-SETLOCAL
-SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
-
-IF EXIST %CACHED_NUGET% goto copynuget
-echo Downloading latest version of NuGet.exe...
-IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
-@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"
-
-:copynuget
-IF EXIST .nuget\nuget.exe goto dnvminstall
-md .nuget
-copy %CACHED_NUGET% .nuget\nuget.exe > nul
+PUSHD %~dp0

 :dnvminstall
-set "DNX_NUGET_API_URL=https://www.nuget.org/api/v2"
-setlocal EnableDelayedExpansion
+SETLOCAL EnableDelayedExpansion
 where dnvm
-if %ERRORLEVEL% neq 0 (
+IF %ERRORLEVEL% neq 0 (
     @powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
-    set PATH=!PATH!;!userprofile!\.dnx\bin
-    set DNX_HOME=!USERPROFILE!\.dnx
-    goto install
+    SET PATH=!PATH!;!userprofile!\.dnx\bin
+    SET DNX_HOME=!USERPROFILE!\.dnx
+    GOTO install
 )

 :install
-call dnvm install 1.0.0-beta5-11511 -r CoreCLR
-call dnvm install 1.0.0-beta5-11511 -r CLR
+CALL dnvm install 1.0.0-beta5-11511 -r CoreCLR
+CALL dnvm install 1.0.0-beta5-11511 -r CLR

 :restore
-call dnu restore src\Autofac
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnu restore src\Autofac
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-call dnu restore src\Autofac.Dnx
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnu restore src\Autofac.Dnx
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-call dnu restore test\Autofac.Test
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnu restore test\Autofac.Test
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-call dnu restore test\Autofac.Dnx.Test
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnu restore test\Autofac.Dnx.Test
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

 :pack
 SETLOCAL ENABLEEXTENSIONS
@@ -48,25 +35,25 @@
 IF DEFINED APPVEYOR_BUILD_NUMBER (SET DNX_BUILD_VERSION=%APPVEYOR_BUILD_NUMBER%) ELSE (SET DNX_BUILD_VERSION=1)
 ECHO DNX_BUILD_VERSION=%DNX_BUILD_VERSION%

-call dnu pack src\Autofac --configuration Release --out artifacts\packages
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnu pack src\Autofac --configuration Release --out artifacts\packages
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-call dnu pack src\Autofac.Dnx --configuration Release --out artifacts\packages
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnu pack src\Autofac.Dnx --configuration Release --out artifacts\packages
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

 :test
-call dnx test\Autofac.Test test
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnx test\Autofac.Test test
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-call dnx test\Autofac.Dnx.Test test
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnx test\Autofac.Dnx.Test test
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-call dnvm use 1.0.0-beta5-11511 -r CoreCLR
+CALL dnvm use 1.0.0-beta5-11511 -r CoreCLR

-call dnx test\Autofac.Test test
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnx test\Autofac.Test test
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-call dnx test\Autofac.Dnx.Test test
-if %errorlevel% neq 0 exit /b %errorlevel%
+CALL dnx test\Autofac.Dnx.Test test
+IF %errorlevel% neq 0 EXIT /b %errorlevel%

-popd+POPD


Build script simplification

Build script simplification

--- build.cmd
+++ build.cmd
@@ -1,11 +1,6 @@
 @echo off
 setlocal
-pushd "%~dp0"
-call :main %*
-popd
-goto :EOF
-
-:main
+cd "%~dp0"
 set MSBUILDEXE=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
 if not exist "%MSBUILDEXE%" (
     echo The .NET Framework 4.0 does not appear to be installed on this
@@ -13,14 +8,12 @@
     exit /b 1
 )
 if "%1"=="docs" call :docs %2 %3 %4 %5 %6 %7 %8 %9 & goto :EOF
-call :base %*
-goto :EOF

 :base
 for %%i in (debug release) do "%MSBUILDEXE%" "MoreLinq.sln" /v:m /p:Configuration=%%i %*
 goto :EOF

 :docs
-call :base %*
+call :base
 "%MSBUILDEXE%" MoreLinq.shfbproj %*
 goto :EOF


Update FAKE.BuildLib 0.3.5 from 0.1.8

Update FAKE.BuildLib 0.3.5 from 0.1.8

--- build.cmd
+++ build.cmd
@@ -6,16 +6,16 @@
 SET NUGET=.\tools\nuget\NuGet.exe
 SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion

-IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 (
+IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.25.4 (
   RD /S/Q %PACKAGEPATH%FAKE
-  %NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS%
-  COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0
+  %NUGET% install FAKE -Version 4.25.4 %NUGETOPTIONS%
+  COPY NUL %PACKAGEPATH%FAKE\Ver_4.25.4
 )

-IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.8 (
+IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.5 (
   RD /S/Q %PACKAGEPATH%FAKE.BuildLib
-  %NUGET% install FAKE.BuildLib -Version 0.1.8 %NUGETOPTIONS%
-  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.8
+  %NUGET% install FAKE.BuildLib -Version 0.3.5 %NUGETOPTIONS%
+  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.3.5
 )

 set encoding=utf-8


add conditional to build.cmd so that dotnet core stuff only happens if BUILD_CORECLR was set to 1

--- build.cmd
+++ build.cmd
@@ -327,35 +327,37 @@
     .\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
     @if ERRORLEVEL 1 echo Error: Nuget restore failed  && goto :failure
 )
-
-:: Restore the Tools directory
-call %~dp0init-tools.cmd
-
-set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
-pushd .\lkg & %_dotnetexe% restore &popd
-@if ERRORLEVEL 1 echo Error: dotnet restore failed  && goto :failure
-
-pushd .\lkg & %_dotnetexe% publish project.json &popd
-@if ERRORLEVEL 1 echo Error: dotnet publish failed  && goto :failure
-
-rem rename fsc and coreconsole to allow fsc.exe to to start compiler
-pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
-fc fsc.exe dotnet.exe >nul
-@if ERRORLEVEL 1 (
-  copy fsc.exe fsc.dll
-  copy dotnet.exe fsc.exe
-)
-popd
-
-rem rename fsc and coreconsole to allow fsc.exe to to start compiler
-pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
-fc fsi.exe dotnet.exe >nul
-@if ERRORLEVEL 1 (
-  copy fsi.exe fsi.dll
-  copy dotnet.exe fsi.exe
-)
-popd
-
+if '%BUILD_CORECLR%' == '1' (
+
+    :: Restore the Tools directory
+    call %~dp0init-tools.cmd
+
+    set _dotnetexe=%~dp0Tools\dotnetcli\dotnet.exe
+    pushd .\lkg & %_dotnetexe% restore &popd
+    @if ERRORLEVEL 1 echo Error: dotnet restore failed  && goto :failure
+
+    pushd .\lkg & %_dotnetexe% publish project.json &popd
+    @if ERRORLEVEL 1 echo Error: dotnet publish failed  && goto :failure
+
+    rem rename fsc and coreconsole to allow fsc.exe to to start compiler
+    pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
+    fc fsc.exe dotnet.exe >nul
+    @if ERRORLEVEL 1 (
+      copy fsc.exe fsc.dll
+      copy dotnet.exe fsc.exe
+    )
+    popd
+
+    rem rename fsc and coreconsole to allow fsc.exe to to start compiler
+    pushd .\lkg\bin\debug\netstandard1.6\win7-x64\publish
+    fc fsi.exe dotnet.exe >nul
+    @if ERRORLEVEL 1 (
+      copy fsi.exe fsi.dll
+      copy dotnet.exe fsi.exe
+    )
+    popd
+
+)
 rem copy targestfile into tools directory ... temporary fix until packaging complete.
 copy src\fsharp\FSharp.Build\Microsoft.FSharp.targets tools\Microsoft.FSharp.targets
 copy src\fsharp\FSharp.Build\Microsoft.Portable.FSharp.targets tools\Microsoft.Portable.FSharp.targets


Restore build script even if WsNoUpdate is set

--- build.cmd
+++ build.cmd
@@ -4,6 +4,9 @@
 if "%WsNoUpdate%"=="" (
   .paket\paket.exe update -g wsbuild
   if errorlevel 1 exit /b %errorlevel%
+) else (
+  .paket\paket.exe restore -g wsbuild
+  if errorlevel 1 exit /b %errorlevel%
 )

 set DOTNETSOLUTION="WebSharper.sln"


fix build script

fix build script

Former-commit-id: 460f1915f26270fce47fa6efb139329a82132a70
Former-commit-id: 7bc40e7b6a451639e111eb4241aab2dd9f7ea970 [formerly 6f237cdb0beefca95d085cafd1515ea7e9c2bae6] [formerly c7394c6ca62910a9b9382a2a892926eafb055b22 [formerly 73248d2310378762bd99f9710c2a651f1f1560aa]]
Former-commit-id: a2118c009ce8bb22837f129bc0c3bd1125e77586 [formerly 60c4d121491feecdb13e1977aad127935d32cc7b]
Former-commit-id: 0dc3b4318f07a15c95fa61e59a6eb47e0e735fe0
Former-commit-id: 954c5437439a635c58f10ec156aa264908fdf49e

--- Dep/build_dep.bat
+++ Dep/build_dep.bat
@@ -3,17 +3,19 @@
 echo Building Dep...

 echo Compiling libevent
-"..\\Tool\\7z.exe" x libevent-2.0.22-stable.tar.gz -Y
-"..\\Tool\\7z.exe" x libevent-2.0.22-stable.tar -Y
-del libevent-2.0.22-stable.tar
+"..\\Tool\\7z.exe" x libevent-release-2.1.8-stable.zip -Y

-if exist libevent rd /S /Q libevent
-rename libevent-2.0.22-stable libevent
-rd /S /Q libevent-2.0.22-stable
+rd libevent  /q /s
+rename libevent-release-2.1.8-stable libevent

-echo extract libevent libs
-"..\\Tool\\7z.exe" x libevent_libs.zip -Y
-copy lib\\Release\\libevent.a lib\\Debug\\ /Y
-copy lib\\Release\\libevent.lib lib\\Debug\\ /Y
-copy lib\\Release\\libevent_core.a lib\\Debug\\ /Y
-copy lib\\Release\\libevent_core.lib lib\\Debug\\ /Y
+echo Compiling evpp
+"..\\Tool\\7z.exe" x evpp.zip -Y -o./evpp
+
+echo Compiling glog
+"..\\Tool\\7z.exe" x glog-0.3.5.zip -Y
+
+rd glog  /q /s
+rename glog-0.3.5 glog
+
+
+


fixed conflict

fixed conflict

--- test/test_app.bat
+++ test/test_app.bat
@@ -2,4 +2,5 @@
 echo "Copyright Benoit MEREL - 2015"

 version = "1.2.1"
+
 echo "version ${version}"


svnimporter generated comment: Deleted . Changed path: [/Version 4.0/makedocsLINUX.bat (deleted)]

git-svn-id: 0cdf8356e41b2d8ccbb41bb76c82068fe80b2514@2921 0d6f1817-ed0e-0410-87c9-987e46238f29

--- makedocsLINUX.bat
+++ makedocsLINUX.bat
@@ -1,9 +0,0 @@
-#This file assumes that Sun's SDK has been installed (to any directory...)
-#Before using this on a UNIX machine, you must 'chmod 755 makemud.bat' to make this file executable by the UNIX machine
-#DO NOT PUT A FORWARD SLASH AT THE END!!!
-Java_Home=/home/knoppix/j2sdk1.4.2
-
-#Leave this line alone...
-classpath=$Java_Home/lib/dt.jar;$Java_Home/lib/tools.jar
-
-$Java_Home/bin/javadoc -classpath $classpath -d ./docs -J-Xmx128m com/planet_ink/coffee_mud/Abilities/*.java com/planet_ink/coffee_mud/Abilities/Archon/*.java com/planet_ink/coffee_mud/Abilities/Common/*.java com/planet_ink/coffee_mud/Abilities/Druid/*.java com/planet_ink/coffee_mud/Abilities/Fighter/*.java com/planet_ink/coffee_mud/Abilities/Languages/*.java com/planet_ink/coffee_mud/Abilities/Misc/*.java com/planet_ink/coffee_mud/Abilities/Paladin/*.java com/planet_ink/coffee_mud/Abilities/Prayers/*.java com/planet_ink/coffee_mud/Abilities/Properties/*.java com/planet_ink/coffee_mud/Abilities/Diseases/*.java com/planet_ink/coffee_mud/Abilities/Poisons/*.java com/planet_ink/coffee_mud/Abilities/Ranger/*.java com/planet_ink/coffee_mud/Abilities/Skills/*.java com/planet_ink/coffee_mud/Abilities/Songs/*.java com/planet_ink/coffee_mud/Abilities/Specializations/*.java com/planet_ink/coffee_mud/Abilities/Spells/*.java com/planet_ink/coffee_mud/Abilities/Thief/*.java com/planet_ink/coffee_mud/Abilities/Traps/*.java com/planet_ink/coffee_mud/application/*.java com/planet_ink/coffee_mud/Areas/*.java com/planet_ink/coffee_mud/Behaviors/*.java com/planet_ink/coffee_mud/CharClasses/*.java com/planet_ink/coffee_mud/Clans/*.java com/planet_ink/coffee_mud/Commands/*.java com/planet_ink/coffee_mud/Commands/base/*.java com/planet_ink/coffee_mud/Commands/sysop/*.java com/planet_ink/coffee_mud/Commands/extra/*.java com/planet_ink/coffee_mud/common/*.java com/planet_ink/coffee_mud/exceptions/*.java com/planet_ink/coffee_mud/Exits/*.java com/planet_ink/coffee_mud/interfaces/*.java com/planet_ink/coffee_mud/Items/*.java com/planet_ink/coffee_mud/Items/Weapons/*.java com/planet_ink/coffee_mud/Items/MiscMagic/*.java com/planet_ink/coffee_mud/Items/Armor/*.java com/planet_ink/coffee_mud/Locales/*.java com/planet_ink/coffee_mud/MOBS/*.java com/planet_ink/coffee_mud/Races/*.java com/planet_ink/coffee_mud/system/*.java com/planet_ink/coffee_mud/utils/*.java com/planet_ink/coffee_mud/web/*.java com/planet_ink/coffee_mud/web/macros/*.java com/planet_ink/coffee_mud/web/macros/grinder/*.java com/planet_ink/fakedb/*.java


commit on 31/01/2019 at 10:52:43

commit on 31/01/2019 at 10:52:43

error: pathspec 'windows-cmd/startPipeClusterLPC.cmd' did not match any file(s) known to git

--- windows-cmd/startPipeClusterLPC.cmd
+++ windows-cmd/startPipeClusterLPC.cmd
@@ -0,0 +1 @@
+cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S1A1 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S2A1 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S2A2 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S3A1 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S3A2 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S3A3 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S5A1 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S5A2 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S5A3 && cd C:/02_Local-folder/01_Luca/01_WD/thinPlyMechanics/windows-cmd && startClusteredRVESimPipeLPC.cmd 1_144S5A5


New script to manage multiple cmd.exe AutoRun scripts.

error: pathspec 'Batch/AutoRun.cmd' did not match any file(s) known to git

--- Batch/AutoRun.cmd
+++ Batch/AutoRun.cmd
@@ -0,0 +1,335 @@
+@echo off
+:##############################################################################
+:#                                                                            #
+:#  Filename        AutoRun.cmd                                               #
+:#                                                                            #
+:#  Description     Manage multiple cmd.exe AutoRun scripts		      #
+:#                                                                            #
+:#  Notes 	    This script manages cmd.exe AutoRun initializations, in   #
+:#		    an easily extensible way, inspired by Unix standards.     #
+:#		    It makes extensions independent of each other, so that    #
+:#		    they can be installed or removed in any order.	      #
+:#                  It also defines installation directories, as specified in #
+:#      https://www.gnu.org/prep/standards/html_node/Directory-Variables.html #
+:#                                                                            #
+:#                  See 'cmd /?' for information about its AutoRun features.  #
+:#                                                                            #
+:#                  To install AutoRun.cmd, copy it to your favorite cmd      #
+:#                  scripts directory (A directory that's in your PATH);      #
+:#		    Then run as Administrator: AutoRun -i		      #
+:#                  If you first want to know what this installation would    #
+:#                  do, run: AutoRun -X -i                                    #
+:#                  In case that another AutoRun script is already present,   #
+:#		    this installation will detect it, and refuse to run.      #
+:#		    It's possible to override that by using the -f option. In #
+:#		    that case the previous AutoRun script is moved to one of  #
+:#                  the extension directories. (See below)		      #
+:#                                                                            #
+:#                  This script does as little as possible, to run as fast    #
+:#                  as possible.                                              #
+:#                  Do not customize it. Instead, put your own extension      #
+:#		    scripts in "%ALLUSERSPROFILE%\AutoRun.cmd.d\" for all     #
+:#                  users, or in "%USERPROFILE%\AutoRun.cmd.d\" for you only. #
+:#                  This is inspired from the way Linux bashrc and login      #
+:#		    scripts are organized, and how they can be extended.      #
+:#                                                                            #
+:#                  This script, or any extension add-on in AutoRun.cmd.d     #
+:#                  directories, must NEVER output anything during their      #
+:#                  initialization. Else this may severely affect outside     #
+:#                  scripts that don't expect sub-cmd instances to display    #
+:#		    anything before they start.				      #
+:#                  Likewise, they must not change directory, nor do anything #
+:#                  that may break existing scripts if they run a sub-cmd.    #
+:#                                                                            #
+:#  Authors         JFL Jean-Franois Larvoire, jf.larvoire@free.fr           #
+:#                                                                            #
+:#  History                                                                   #
+:#   2019-02-03 JFL Created this script.                                      #
+:#   2019-02-04 JFL Added options -a and -c.                                  #
+:#		    Make sure bindir* directories are in the PATH.            #
+:#		                                                              #
+:#          Copyright 2019 Hewlett Packard Enterprise Development LP         #
+:# Licensed under the Apache 2.0 license  www.apache.org/licenses/LICENSE-2.0 #
+:##############################################################################
+
+setlocal EnableExtensions EnableDelayedExpansion
+set "VERSION=2019-02-04"
+set "SCRIPT=%~nx0"				&:# Script name
+set "SPATH=%~dp0" & set "SPATH=!SPATH:~0,-1!"	&:# Script path, without the trailing \
+set "SFULL=%~f0"				&:# Script full pathname
+set ^"ARG0=%0^"					&:# Script invokation name
+set ^"ARGS=%*^"					&:# Argument line
+goto :main
+
+:#----------------------------------------------------------------------------#
+:# make sure a directory is in the PATH
+:PutInPath %1=directory that should be in the PATH
+setlocal EnableExtensions EnableDelayedExpansion
+if not "!PATH:~0,1!"==";" set "PATH=;!PATH!"
+if not "!PATH:~-1!"==";" set "PATH=!PATH!;"
+if "!PATH:;%~1;=;!"=="!PATH!" set "PATH=!PATH!%~1;"
+set "PATH=!PATH:~1,-1!" &:# Trim the extra ; added above
+endlocal & set "PATH=%PATH%" & exit /b
+
+:#----------------------------------------------------------------------------#
+:# Check if the user has system administrator rights. %ERRORLEVEL% 0=Yes; 5=No
+:IsAdmin
+>NUL 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
+exit /b
+
+:#----------------------------------------------------------------------------#
+:# Extract the ARG0 and ARG1 from %CMDCMDLINE% using cmd.exe own parser
+:SplitArgs
+set "ARG0=%1"
+set "ARG1=%2"
+exit /b
+
+:#----------------------------------------------------------------------------#
+:# Installation routine
+:install
+setlocal EnableExtensions EnableDelayedExpansion
+
+:# Check prerequisites
+if /i "%PROCESSOR_ARCHITECTURE%" neq "x86" if /i "%PROCESSOR_ARCHITECTURE%" neq "AMD64" (
+  if not "%FORCE%"=="1" (
+    >&2 echo Error: This script does not support the %PROCESSOR_ARCHITECTURE% processor architecture
+    exit /b 1
+  )
+)
+
+:# Create the extension directories
+for %%h in (HKLM HKCU) do (
+  if not exist "!AUTORUN.D[%%h]!" %EXEC% md "!AUTORUN.D[%%h]!"
+)
+
+:# Test if there are previously installed AutoRun scripts
+for %%h in (HKLM HKCU) do (
+  call :query %%h AutoRun
+  if defined AutoRun (
+    if not "%SFULL%"=="!AutoRun!" (
+      if not "%FORCE%"=="1" (
+	>&2 echo Error: Another AutoRun script is already installed for !USER[%%h]!: !AutoRun!
+	endlocal & exit /b 1
+      )
+      :# In force mode, move the previous autorun to AutoRun.cmd.d
+      %ECHO.COMMENT% Moving the existing AutoRun script !AutoRun! to !AUTORUN.D[%%h]!
+      %EXEC% move "!AutoRun!" "!AUTORUN.D[%%h]!"
+      :# Also delete its key, else the next call to :query will display an error
+      set "KEY=%%h\Software\Microsoft\Command Processor"
+      %ECHO.COMMENT% Deleting "!KEY!\AutoRun"
+      %EXEC% reg delete "!KEY!" /v "AutoRun" /f
+    ) else (
+      %ECHO.COMMENT% Already installed
+      endlocal & exit /b 0
+    )
+  )
+)
+:# OK, no previous instance installed. Try installing ourselves
+if not defined HIVE (
+  call :IsAdmin
+  if not errorlevel 1 (	:# Admin user. Install for all users.
+    set "HIVE=HKLM"
+  ) else (		:# Normal user. Install for himself.
+    set "HIVE=HKCU"
+  )
+)
+set "KEY=%HIVE%\Software\Microsoft\Command Processor"
+%ECHO.COMMENT% Creating registry key "%KEY%" value "AutoRun"
+%EXEC% reg add "%KEY%" /v "AutoRun" /t REG_SZ /d "%SFULL%" /f
+
+endlocal & exit /b
+
+:#----------------------------------------------------------------------------#
+:# Uninstallation routine
+:uninstall
+setlocal EnableExtensions EnableDelayedExpansion
+set "HIVES=%HIVE%"
+if not defined HIVES set "HIVES=HKLM HKCU"
+:# Test if there are previously installed AutoRun scripts
+for %%h in (%HIVES%) do (
+  call :query %%h AutoRun
+  if defined AutoRun (
+    if not "%SFULL%"=="!AutoRun!" if not "%FORCE%"=="1" (
+      >&2 echo Error: Another AutoRun script is installed for !USER[%%h]!: "!AutoRun!"
+      endlocal & exit /b 1
+    )
+    set "KEY=%%h\Software\Microsoft\Command Processor"
+    %ECHO.COMMENT% Deleting regisry key "!KEY!" value "AutoRun"
+    %EXEC% reg delete "!KEY!" /v "AutoRun" /f
+  )
+)
+endlocal & exit /b
+
+:#----------------------------------------------------------------------------#
+:# Installation test routine
+:query %1=Hive %2=OutputVarName
+setlocal EnableExtensions EnableDelayedExpansion
+set "KEY=%1\Software\Microsoft\Command Processor"
+for /f "skip=2 tokens=2,3*" %%a in ('reg query "!KEY!" /v "AutoRun" 2^>NUL') do (
+  set "TYPE=%%a"
+  set "VALUE=%%b"
+  if "%~2"=="" echo !USER[%1]!: !VALUE!
+  if "!TYPE!"=="REG_EXPAND_SZ" call set "VALUE=!VALUE!"
+)
+endlocal & (if not "%~2"=="" (set "%~2=%VALUE%")) & exit /b
+
+:#----------------------------------------------------------------------------#
+:# Installation enumeration routine
+:list
+setlocal EnableExtensions EnableDelayedExpansion
+:# First display the AutoRun scripts configured
+%ECHO.COMMENT% AutoRun scripts:
+for %%h in (HKLM HKCU) do call :query %%h
+:# Then display available extension scripts
+%ECHO.COMMENT%.
+%ECHO.COMMENT% Extension scripts:
+for %%h in (HKLM HKCU) do if exist "!AUTORUN.D[%%h]!" (
+  for %%b in ("!AUTORUN.D[%%h]!\*.bat" "!AUTORUN.D[%%h]!\*.cmd") do (
+    echo !USER[%%h]!: %%~b
+  )
+)
+endlocal & exit /b
+
+:#----------------------------------------------------------------------------#
+:# Help routine
+:help
+echo %SCRIPT% - Extensible initialization of cmd.exe
+echo.
+echo Usage %SCRIPT% [OPTIONS]
+echo.
+echo Options:
+echo   -?    Display this help
+echo   -a    Do install/uninstall for all users (Default if running as admin.)
+echo   -c    Do install/uninstall for the current user (Default if non-admin.)
+echo   -f    Force install/uninstall in the presence of another AutoRun script
+echo   -i    Install %SCRIPT%, to run automatically every time cmd.exe starts
+echo   -l    List AutoRun scripts installed
+echo   -u    Uninstall %SCRIPT%, or any other AutoRun script with option -f
+echo   -V    Display this script version
+echo   -X    No-eXec mode: Display commands to execute, but don't run them
+echo.
+echo Add your own *.bat or *.cmd extension scripts in:
+echo   "%%ALLUSERSPROFILE%%\AutoRun.cmd.d\" for all users
+echo   "%%USERPROFILE%%\AutoRun.cmd.d\" for yourself only
+echo These extension scripts must not display anything, or change directory, or
+echo do anything that might surprise other scripts that start a sub-cmd shell.
+exit /b
+
+:#----------------------------------------------------------------------------#
+:# Main routine
+:main
+set "ECHO.COMMENT=echo"
+set "DEBUG.LOG=rem"
+set "DEBUG.LOG=if exist "%TEMP%\AutoRun.log" >>"%TEMP%\AutoRun.log" echo"
+%DEBUG.LOG% :#--------------------------------- %SCRIPT% --------------------------------#
+%DEBUG.LOG% set "CMDCMDLINE=!CMDCMDLINE!"
+%DEBUG.LOG% set "%%0 %%*=%0 %*"
+set "FORCE=0"
+set "EXEC="
+set "ACTION=start"
+set "AUTORUN.D[HKLM]=%ALLUSERSPROFILE%\AutoRun.cmd.d"
+set "AUTORUN.D[HKCU]=%USERPROFILE%\AutoRun.cmd.d"
+set "USER[HKLM]=all users"
+set "USER[HKCU]=%USERNAME%"
+set "HIVE="
+
+:# Parse script arguments
+goto :get_arg
+:next_arg
+shift
+:get_arg
+if [%1]==[] goto :%ACTION% &:# No more arguments. Run the selected action
+if "%~1"=="-?" goto :help
+if "%~1"=="/?" goto :help
+if "%~1"=="-a" set "HIVE=HKLM" & goto :next_arg
+if "%~1"=="-c" set "HIVE=HKCU" & goto :next_arg
+if "%~1"=="-f" set "FORCE=1" & goto :next_arg
+if "%~1"=="-i" set "ACTION=install" & goto :next_arg
+if "%~1"=="-l" set "ACTION=list" & goto :next_arg
+if "%~1"=="-u" set "ACTION=uninstall" & goto :next_arg
+if "%~1"=="-V" (echo.%VERSION%) & exit /b
+if "%~1"=="-X" set "EXEC=echo" & set "ECHO.COMMENT=echo :#" & goto :next_arg
+>&2 echo Unknown argument: %1
+exit /b 1
+
+:#----------------------------------------------------------------------------#
+:# Initialize cmd.exe every time a new instance starts
+:start
+:# if not defined bindir.noarch goto :init_now &:# It's never been done, so it's needed
+:# Caution: The AutoRun script is also invoked when running: for /f %%l in ('some command') do ...
+:#          We do not want to run the initializations in that case, as this can have
+:#	    unexpected side effects on the parent script variables.
+:# TO DO: The actual command for running a new cmd instance is available in the "Command Prompt.lnk" shortcut.
+:#        It would be nice to extract it from there, and compare it to %CMDCMDLINE%.
+:#        This is feasible using JScript WshShell.Createshortcut().
+:#        But the performance penalty each time a cmd.exe starts would not be acceptable,
+:#        unless we do it only once at install time.
+:# Workaround for now: Check that a full quoted COMSPEC was used, _not_ using /c.
+call :SplitArgs %CMDCMDLINE%
+if not "!ARG0!"==^""%COMSPEC%"^" (
+  %DEBUG.LOG% :# This is not a new top cmd.exe instance
+  exit /b 0
+)
+if /i "!ARG1!"=="/c" (
+  %DEBUG.LOG% :# This is not a new top cmd.exe instance
+  exit /b 0
+)
+:init_now
+%DEBUG.LOG% :# This is a new top cmd.exe instance. Initialize it.
+
+:# Now on, every variable will be created in the parent cmd.exe instance
+endlocal & (
+  :# Create common PATH variables
+  if not defined HOME set "HOME=%HOMEDRIVE%%HOMEPATH%"
+
+  :# Call all extension scripts in AutoRun.cmd.d directories
+  for %%p in ("%AUTORUN.D[HKLM]%" "%AUTORUN.D[HKCU]%") do if exist "%%~p" (
+    for %%b in ("%%~p\*.bat" "%%~p\*.cmd") do (
+      call "%%~b"
+    )
+  )
+)
+
+:# Standard variables for installation directories
+:# See: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+:# They can be overridden individually by defining them in an extension script above
+if not defined prefix set "prefix=%ProgramFiles%" &:# Where to install everything
+if not defined exec_prefix set "exec_prefix=%prefix%" &:# Base dir for executables
+if not defined bindir ( :# Where to put programs and scripts
+  for %%p in ("%~nx0") do ( :# Use the directory where this AutoRun.cmd script was installed
+    if "%%~f$PATH:p"=="%~f0" (	:# OK, this script path is in the PATH. Use it.
+      set "bindir=%~dp0:" &rem Append a : to flag the trailing \ in %~dp0
+    ) else (			:# Else use the standard default
+      set "bindir=%exec_prefix%\bin"
+    )
+  )
+)
+set "bindir=%bindir:\:=%" &:# Trim the trailing \ inserted by %~dp0 above
+if not defined libdir set "libdir=%exec_prefix%\lib"
+if not defined includedir set "includedir=%prefix%\include"
+:# Extensions for Windows, in case we want to install both 32 and 64-bits versions of programs
+:# Use a suffix with the %PROCESSOR_ARCHITECTURE%: x86 or AMD64
+:# Use _ for the suffix separator, as it is valid in nmake.exe variable names => Usable in an 'nmake install' rule.
+if not defined bindir_%PROCESSOR_ARCHITECTURE% set "bindir_%PROCESSOR_ARCHITECTURE%=%exec_prefix%\bin"
+if not defined libdir_%PROCESSOR_ARCHITECTURE% set "libdir_%PROCESSOR_ARCHITECTURE%=%exec_prefix%\lib"
+if /i "%PROCESSOR_ARCHITECTURE%" neq "x86" ( :# This one supports dual installs
+  if not defined exec_prefix86 (
+    if "%prefix%"=="%ProgramFiles%" (	:# Use Windows' default
+      set "exec_prefix86=%ProgramFiles(x86)%"
+    ) else (				:# Use a path within the requested %prefix% directory
+      set "exec_prefix86=%prefix%\x86"
+    )
+  )
+)
+if /i "%PROCESSOR_ARCHITECTURE%" neq "x86" ( :# This one supports dual installs
+  if not defined bindir_x86 set "bindir_x86=%exec_prefix86%\bin"
+  if not defined libdir_x86 set "libdir_x86=%exec_prefix86%\lib"
+)
+
+:# Make sure bindir* directories are in the PATH
+call :PutInPath "%bindir%"
+if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" if /i "%bindir_AMD64%" neq "%bindir%" call :PutInPath "%bindir_AMD64%"
+if /i "%bindir_x86%" neq "%bindir%" call :PutInPath "%bindir_x86%"
+
+:# Done
+exit /b