Created
May 31, 2016 23:22
-
-
Save lukesampson/210853bdace8e381ff1cb27ef37c8be9 to your computer and use it in GitHub Desktop.
Overwrites a bad Scoop install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -v 3 | |
# remote install: | |
# iex (new-object net.webclient).downloadstring('https://get.scoop.sh') | |
$erroractionpreference='stop' # quit if anything goes wrong | |
# get core functions | |
$core_url = 'https://raw.github.com/lukesampson/scoop/master/lib/core.ps1' | |
echo 'initializing...' | |
iex (new-object net.webclient).downloadstring($core_url) | |
# prep | |
$dir = ensure (versiondir 'scoop' 'current') | |
# download scoop zip | |
$zipurl = 'https://github.com/lukesampson/scoop/archive/master.zip' | |
$zipfile = "$dir\scoop.zip" | |
echo 'downloading...' | |
dl $zipurl $zipfile | |
'extracting...' | |
unzip $zipfile "$dir\_scoop_extract" | |
cp "$dir\_scoop_extract\scoop-master\*" $dir -r -force | |
rm "$dir\_scoop_extract" -r -force | |
rm $zipfile | |
echo 'creating shim...' | |
shim "$dir\bin\scoop.ps1" $false | |
ensure_robocopy_in_path | |
ensure_scoop_in_path | |
success 'scoop was re-installed successfully!' | |
echo "type 'scoop help' for instructions" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment