github.com/openimsdk/tools@v0.0.49/utils/mageutil/usage-guide/bootstrap.bat (about)

     1  @echo off
     2  SETLOCAL
     3  
     4  mage -version >nul 2>&1
     5  IF %ERRORLEVEL% EQU 0 (
     6      echo Mage is already installed.
     7      GOTO DOWNLOAD
     8  )
     9  
    10  go version >nul 2>&1
    11  IF NOT %ERRORLEVEL% EQU 0 (
    12      echo Go is not installed. Please install Go and try again.
    13      exit /b 1
    14  )
    15  
    16  echo Installing Mage...
    17  go install github.com/magefile/mage@latest
    18  
    19  mage -version >nul 2>&1
    20  IF NOT %ERRORLEVEL% EQU 0 (
    21      echo Mage installation failed.
    22      echo Please ensure that %GOPATH%/bin is in your PATH.
    23      exit /b 1
    24  )
    25  
    26  echo Mage installed successfully.
    27  
    28  :DOWNLOAD
    29  go mod download
    30  
    31  ENDLOCAL