-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
@echo off | ||
|
||
rem This is the launcher script of Scala CLI (https://github.com/VirtusLab/scala-cli). | ||
rem This script downloads and runs the Scala CLI version set by VERSION below. | ||
rem | ||
rem Download the latest version of this script at https://github.com/VirtusLab/scala-cli/raw/master/scala-cli.bat | ||
|
||
setlocal enabledelayedexpansion | ||
|
||
set "SCALA_CLI_VERSION=0.0.5" | ||
set SCALA_CLI_URL=https://github.com/VirtusLab/scala-cli/releases/download/v%SCALA_CLI_VERSION%/scala-cli.bat | ||
set CACHE_BASE=%localappdata%/Coursier/v1 | ||
|
||
set CACHE_DEST=%CACHE_BASE%/https/github.com/VirtusLab/scala-cli/releases/download/v%SCALA_CLI_VERSION% | ||
set SCALA_CLI_BIN_PATH=%CACHE_DEST%/scala-cli.bat | ||
|
||
if not exist "%SCALA_CLI_BIN_PATH%" ( | ||
|
||
if not exist "%CACHE_DEST%" mkdir "%CACHE_DEST%" | ||
|
||
where /Q curl | ||
if %ERRORLEVEL% EQU 0 ( | ||
curl -fLo "%SCALA_CLI_BIN_PATH%" "%SCALA_CLI_URL%" | ||
) else ( | ||
echo Could not download scala-cli %SCALA_CLI_VERSION%. Please, install curl and run './scala-cli.bat' again. | ||
exit 1 | ||
) | ||
) | ||
|
||
%SCALA_CLI_BIN_PATH% %* | ||
@echo off | ||
|
||
rem This is the launcher script of Scala CLI (https://github.com/VirtusLab/scala-cli). | ||
rem This script downloads and runs the Scala CLI version set by VERSION below. | ||
rem | ||
rem Download the latest version of this script at https://github.com/VirtusLab/scala-cli/raw/master/scala-cli.bat | ||
|
||
setlocal enabledelayedexpansion | ||
|
||
set "SCALA_CLI_VERSION=0.0.5" | ||
|
||
set SCALA_CLI_URL=https://github.com/VirtusLab/scala-cli/releases/download/v%SCALA_CLI_VERSION%/scala-cli.bat | ||
set CACHE_BASE=%localappdata%/Coursier/v1 | ||
|
||
set CACHE_DEST=%CACHE_BASE%/https/github.com/VirtusLab/scala-cli/releases/download/v%SCALA_CLI_VERSION% | ||
set SCALA_CLI_BIN_PATH=%CACHE_DEST%/scala-cli.bat | ||
|
||
if not exist "%SCALA_CLI_BIN_PATH%" ( | ||
|
||
if not exist "%CACHE_DEST%" mkdir "%CACHE_DEST%" | ||
|
||
where /Q curl | ||
if %ERRORLEVEL% EQU 0 ( | ||
curl -fLo "%SCALA_CLI_BIN_PATH%" "%SCALA_CLI_URL%" | ||
) else ( | ||
echo Could not download scala-cli %SCALA_CLI_VERSION%. Please, install curl and run './scala-cli.bat' again. | ||
exit 1 | ||
) | ||
) | ||
|
||
%SCALA_CLI_BIN_PATH% %* |