forked from spicylemonade/punch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
29 lines (17 loc) · 738 Bytes
/
build.ps1
File metadata and controls
29 lines (17 loc) · 738 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
25
26
27
28
29
if (!(Get-Command rustup -errorAction SilentlyContinue)){
curl https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe `
-o "rustup-init.exe"
, "1" * 2 | ./rustup-init.exe
}
if (!(Test-Path -Path "$Env:USERPROFILE\.punch")){
mkdir -p "$Env:USERPROFILE\.punch\trash"
mkdir "$Env:USERPROFILE\.punch\bin"
echo "~/.punch created in home"
}
cargo build --release
curl https://aka.ms/vs/16/release/vs_BuildTools.exe `
-o "vs_BuildTools.exe"
mv .\target\release\punch.exe $Env:USERPROFILE\.punch\bin\
$Env:PATH = "$Env:PATH; $ENV:USERPROFILE\.punch\bin\"
echo '$Env:PATH = "$Env:PATH; $ENV:USERPROFILE.punch\bin"' >> $profile
echo "build complete-- type: punch -h"