forked from ScoopInstaller/Scoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.ps1
30 lines (24 loc) · 862 Bytes
/
install.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
# install with:
# iex (new-object net.webclient).downloadstring('https://raw.github.com/lukesampson/scoop/master/install.ps1')
$erroractionpreference='stop' # for try-catch to work
# get core functions
$init_url = 'https://raw.github.com/lukesampson/scoop/master/lib/init.ps1'
echo 'initializing...'
iex (new-object net.webclient).downloadstring($init_url)
# prep
assert_not_installed 'scoop' 'bootstrap'
$appdir = appdir 'scoop' 'bootstrap'
$abs_appdir = ensure $appdir
# download scoop zip
$zipurl = 'https://github.com/lukesampson/scoop/archive/master.zip'
$zipfile = "$abs_appdir\scoop.zip"
echo 'downloading...'
dl $zipurl $zipurl
echo 'extracting...'
unzip $zipurl $abs_appdir
rm $zipurl
echo 'creating stub...'
stub "$abs_appdir\scoop.ps1"
ensure_scoop_in_path
success 'you successfully installed scoop!'
echo 'type "scoop help" for instructions'