From 51eb69db280c0ba05becccfbdce49705a6e32573 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Mon, 30 Jan 2017 23:00:23 +0100 Subject: [PATCH] Add coursier.bat script --- coursier.bat | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 coursier.bat diff --git a/coursier.bat b/coursier.bat new file mode 100644 index 000000000..194c3aed2 --- /dev/null +++ b/coursier.bat @@ -0,0 +1,29 @@ +@REM https://github.com/xerial/sbt-pack/blob/master/src/main/templates/launch-bat.mustache +@REM would be worth getting more inspiration from + +@echo off + +SET ERROR_CODE=0 + +SET LAUNCHER_PATH=%~dp0/coursier + +IF NOT EXIST %LAUNCHER_PATH% ( + bitsadmin /transfer "DownloadCoursierLauncher" https://github.com/alexarchambault/coursier/raw/master/coursier %LAUNCHER_PATH% +) + +SET CMD_LINE_ARGS=%* + +java -jar %LAUNCHER_PATH% %CMD_LINE_ARGS% + +IF ERRORLEVEL 1 GOTO error +GOTO end + +:error +SET ERROR_CODE=1 + +:end +SET LAUNCHER_PATH= +SET CMD_LINE_ARGS= + +EXIT /B %ERROR_CODE% +