2018-03-23 22:20:07 +08:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
call "%~dp0lib_base.cmd"
|
|
|
|
call "%%~dp0lib_console"
|
|
|
|
set lib_profile=call "%~dp0lib_profile.cmd"
|
|
|
|
|
|
|
|
if "%~1" == "/h" (
|
2018-05-31 20:35:02 +08:00
|
|
|
%lib_base% help "%~0"
|
2018-03-23 22:20:07 +08:00
|
|
|
) else if "%1" neq "" (
|
|
|
|
call :%*
|
|
|
|
)
|
|
|
|
|
|
|
|
exit /b
|
|
|
|
|
|
|
|
:run_profile_d
|
|
|
|
:::===============================================================================
|
|
|
|
:::run_profile_d - Run all scripts in the passed dir path
|
|
|
|
:::
|
|
|
|
:::include:
|
|
|
|
:::
|
2018-05-31 20:35:02 +08:00
|
|
|
::: call "lib_profile.cmd"
|
2018-03-23 22:20:07 +08:00
|
|
|
:::
|
|
|
|
:::usage:
|
|
|
|
:::
|
|
|
|
::: %lib_profile% "[dir_path]"
|
|
|
|
:::
|
|
|
|
:::required:
|
|
|
|
:::
|
|
|
|
::: [dir_path] <in> Fully qualified directory path containing init *.cmd|*.bat.
|
|
|
|
::: Example: "c:\bin"
|
|
|
|
:::
|
|
|
|
::: path <out> Sets the path env variable if required.
|
|
|
|
:::-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if not exist "%~1" (
|
|
|
|
mkdir "%~1"
|
|
|
|
)
|
|
|
|
|
|
|
|
pushd "%~1"
|
|
|
|
for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do (
|
2020-12-08 03:41:11 +08:00
|
|
|
%print_verbose% "Calling '%~1\%%x'..."
|
2018-03-23 22:20:07 +08:00
|
|
|
call "%~1\%%x"
|
|
|
|
)
|
|
|
|
popd
|
|
|
|
exit /b
|
2018-09-16 01:52:23 +08:00
|
|
|
|