-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrunfirstly_scripts_onlytest.bat
53 lines (41 loc) · 1.15 KB
/
runfirstly_scripts_onlytest.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
:: 取得当前路径
SET CUR_PATH="%~dp0"
SET VER="%1"
:: 获取管理员权限
:: if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
:: -------------------------------------- 链接配置 -------------------------------------------
if not exist %CUR_PATH%output\%VER%\ini (
mklink /d %CUR_PATH%output\%VER%\ini %CUR_PATH%doc\ini
)
:: mysql dll拷贝
del /q %CUR_PATH%output\%VER%\libmysql.dll
xcopy /s /y %CUR_PATH%\3rd\mysql\win\lib\libmysql.dll %CUR_PATH%\output\%VER%\
:: ------------------------------------ 结束杂项链接 -----------------------------------------
echo Done!
ping -n 1 -w 1618 11.11.11.11 > nul
exit 0
:: -------------------------------------- 函数定义 -------------------------------------------
:: relink目录函数定义
:relink_dir
if exist %2 (
rd /s/q %2
)
mklink /d %2 %1
goto EOF
:: relink文件函数定义
:relink_file
if exist %2 (
del /q %2
)
mklink %2 %1
goto EOF
::remove_dir 删除目录
:remove_dir
set DelDir=%1
if exist %delDir% (
rd /s/q %delDir%
)
goto EOF
:: ------------------------------------ 结束函数定义 -----------------------------------------
:EOF