Created
August 30, 2012 08:34
-
-
Save rabitarochan/3524223 to your computer and use it in GitHub Desktop.
sbtでビルドするための最低限必要なファイルを作成するためのバッチ (Windows)
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
@echo off | |
if exist build.sbt ( | |
echo [error] Project already exists. | |
exit /b 1 | |
) | |
if not "%1" == "" ( | |
set project_name=%1 | |
) else ( | |
echo [info] Please enter the name of the creating project. | |
set /p project_name=">" | |
) | |
if "%project_name%" == "" ( | |
echo [error] Project name was not entered. | |
exit /b 1 | |
) | |
:: create src dir. | |
mkdir src\main\scala >nul 2>&1 | |
echo [info] Create a directory "src\main\scala" | |
mkdir src\test\scala >nul 2>&1 | |
echo [info] Create a directory "src\test\scala" | |
:: build.sbt | |
echo name := "%project_name%">build.sbt 2>nul | |
echo.>>build.sbt 2>nul | |
echo version := "1.0">>build.sbt 2>nul | |
echo.>>build.sbt 2>nul | |
echo [info] Create "build.sbt" file. | |
:: success | |
set t=%time: =0% | |
set t=%t:~0,8% | |
echo [success] Project "%project_name%" created %date% %t% | |
exit /b 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment