Skip to content

Instantly share code, notes, and snippets.

@jjcodes78
Created February 21, 2016 08:47
Show Gist options
  • Save jjcodes78/6dc465cf641d21ad6fa3 to your computer and use it in GitHub Desktop.
Save jjcodes78/6dc465cf641d21ad6fa3 to your computer and use it in GitHub Desktop.
Batch script para instalação do Laravel Framework via prompt no Windows
@echo off
echo Laravel Installer
if "%1" == "init" goto init
if "%1" == "new" goto new
echo Uso:
echo laravel init [versao] - instala uma nova aplicacao na pasta atual (precisa estar vazia a pasta!)
echo laravel new [nome] [versao] - instala uma nova aplicacao na pasta 'nome'. Se nome nao for indicado ele criara na pasta 'laravel' por padrao.
goto finish
:init
echo Iniciando a instalacao...
composer create-project laravel/laravel . --prefer-dist %2
goto finish
:new
if "%3"=="" goto new-default
echo Iniciando a instalacao em [%2]...
composer create-project laravel/laravel %2 --prefer-dist %3
:new-default
echo Iniciando a instalacao em [laravel] com a versao [%2]...
composer create-project laravel/laravel laravel --prefer-dist %2
:finish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment