Skip to content

Instantly share code, notes, and snippets.

@jinwoo-jeon0
Last active March 10, 2019 15:02
Show Gist options
  • Save jinwoo-jeon0/c503487e4f13c7c680d53d58750873b9 to your computer and use it in GitHub Desktop.
Save jinwoo-jeon0/c503487e4f13c7c680d53d58750873b9 to your computer and use it in GitHub Desktop.
@setlocal
@echo off
if [%1] equ [] goto usage
set new-scoop-dir=%1
mkdir "%new-scoop-dir%"
if errorlevel 1 goto end
mklink /j %USERPROFILE%\scoop "%new-scoop-dir%"
if errorlevel 1 goto end
call powershell -ExecutionPolicy RemoteSigned -Command "iex (new-object net.webclient).downloadstring('https://get.scoop.sh')"
if errorlevel 1 goto end
call scoop install git
if errorlevel 1 goto end
call scoop bucket add extras
if errorlevel 1 goto end
call scoop bucket add versions
if errorlevel 1 goto end
call scoop update
if errorlevel 1 goto end
goto end
:usage
echo "%~nx0" ^(new-scoop-directory^)
set errorlevel=1
:end
exit /b %errorlevel%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment