-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.ps1
56 lines (41 loc) · 1.96 KB
/
setup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# setup.ps1
# This is intended to...
# 1. Setup cygwin with all packages
# 2. Setup ubuntu font
# 3. Anything else that needs setting up on Windows profile
$osArch = (gwmi win32_operatingsystem | select osarchitecture).osarchitecture
if($osArch -eq "32-bit") {
$download = "http://cygwin.com/setup-x86.exe";
$cygInstallFolder = "c:\cygwin";
} else {
$download = "http://cygwin.com/setup-x86_64.exe";
$cygInstallFolder = "c:\cygwin64";
}
$TempCygDir = "$env:temp\cygInstall";
#$mirror = "http://www.gtlib.gatech.edu/pub/cygwin/";
$mirror = 'http://mirror.steadfast.net/cygwin/';
# Install Cygwin
if(!(Test-Path -Path $TempCygDir -PathType Container)) {
$null = New-Item -Type Directory -Path $TempCygDir -Force
}
$packagesStr = ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aikeru/sauce/master/packages.txt'))
$packages = ($packagesStr -split '[\r\n]') |? {$_}
$packageList = [String]::Join(",", $packages);
$client = new-object System.Net.WebClient
$client.DownloadFile($download, "$TempCygDir\setup.exe");
"Installing ===================="
$packageList
"==============================="
Start-Process -wait -FilePath "$TempCygDir\setup.exe" -ArgumentList ("-q -n -l $TempCygDir -s " + $mirror + " -R " + $cygInstallFolder + " -P " + $packageList);
"Cygwin should now be installed."
$gitHubRoot = "https://raw.githubusercontent.com/aikeru/sauce/master/";
$installFontUrl = $gitHubRoot + "scripts/Add-Font.ps1"
$fontUrl = $gitHubRoot + "assets/Ubuntu Mono for Powerline_0.ttf"
$client.DownloadFile($installFontUrl, "$TempCygDir\Add-Font.ps1");
$client.DownloadFile($fontUrl, "$TempCygDir\Ubuntu Mono for Powerline_0.ttf");
iex($TempCygDir + '\Add-Font.ps1 -Path "' + $TempCygDir + '\Ubuntu Mono for Powerline_0.ttf"');
"Installing Chocolatey..."
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
"Chocolatey should be installed ..."
choco install nodejs
"Node.js should be installed now..."