forked from bpdesilva/MSScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJekyll.bat
More file actions
24 lines (21 loc) · 735 Bytes
/
Jekyll.bat
File metadata and controls
24 lines (21 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
:: Source : https://superuser.com/questions/667607/check-if-current-command-prompt-was-launched-as-the-administrator
@echo off
whoami /groups | find "S-1-16-12288" > nul
if %errorlevel% == 0 (
echo Welcome, Admin
if(Test-Path -Path "$env:ProgramData\Chocolatey") {
echo Installing ruby
choco install ruby -y
gem install bundler
gem install jekyll
}
else {
echo Installing Chocolatey
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install ruby -y
gem install bundler
gem install jekyll
}
) else (
echo Get lost, User
)