Skip to content

Commit

Permalink
增加初始化安装工具
Browse files Browse the repository at this point in the history
  • Loading branch information
xi3892 committed Nov 9, 2024
1 parent 5b275a7 commit 4af16ea
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Doc/StarInstall.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@echo off
setlocal enabledelayedexpansion

@REM create star folder
mkdir star

@REM traverse all zip files in the current directory
for %%f in (*.zip) do (
@REM skip agent.zip
if /I "%%f" NEQ "agent.zip" (
@REM get filename (without extension)
set "filename=%%~nf"

@REM filename to lowercase
for %%A in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
call set "filename=!filename:%%A=%%A!"
)

@REM remove star characters from filename
set "filename=!filename:star=!"
echo !filename!

@REM create folder with filename
mkdir "star\!filename!" 2>nul

@REM move zip file to folder
move /Y "%%f" "star\!filename!\"
)
)

@REM tar agent folder
tar -xf agent.zip

@REM test agent
call agent\StarAgent.exe

echo move completed
endlocal
pause

0 comments on commit 4af16ea

Please sign in to comment.