Skip to content

Commit 6d9bca8

Browse files
committed
whitespace cleanup
* makes changes to almost all main repo files to be in accordance with .editorconfig * some files in "test\fixtures\..." were left alone to avoid breaking tests * NOTE: whitespace changes *only* (`git diff -b` shows no changes)
1 parent 86d9946 commit 6d9bca8

File tree

152 files changed

+3584
-3584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+3584
-3584
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2121
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2222
OTHER DEALINGS IN THE SOFTWARE.
2323

24-
For more information, please refer to <http://unlicense.org/>
24+
For more information, please refer to <http://unlicense.org/>

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Requirements:
1111
To install:
1212

1313
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
14-
14+
1515
Once installed, run `scoop help` for instructions.
1616

1717
What does Scoop do?
@@ -51,4 +51,4 @@ The apps that install best with Scoop are commonly called "portable" apps: i.e.
5151

5252
Since installers are common, Scoop supports them too (and their uninstallers).
5353

54-
Scoop is also great at handling single-file programs and Powershell scripts. These don't even need to be compressed. See the [runat](https://github.com/lukesampson/scoop/blob/master/bucket/runat.json) package for an example: it's really just a GitHub gist.
54+
Scoop is also great at handling single-file programs and Powershell scripts. These don't even need to be compressed. See the [runat](https://github.com/lukesampson/scoop/blob/master/bucket/runat.json) package for an example: it's really just a GitHub gist.

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "{build}-{branch}"
22

33
branches:
4-
except:
4+
except:
55
- gh-pages
66

77
init:

bin/checkver.ps1

+62-62
Original file line numberDiff line numberDiff line change
@@ -15,75 +15,75 @@ if($app) { $search = $app }
1515
# get apps to check
1616
$queue = @()
1717
gci $dir "$search.json" | % {
18-
$json = parse_json "$dir\$_"
19-
if($json.checkver) {
20-
$queue += ,@($_, $json)
21-
}
18+
$json = parse_json "$dir\$_"
19+
if($json.checkver) {
20+
$queue += ,@($_, $json)
21+
}
2222
}
2323

2424
# clear any existing events
2525
get-event | % {
26-
remove-event $_.sourceidentifier
26+
remove-event $_.sourceidentifier
2727
}
2828

2929
# start all downloads
3030
$queue | % {
31-
$wc = new-object net.webclient
32-
register-objectevent $wc downloadstringcompleted -ea stop | out-null
31+
$wc = new-object net.webclient
32+
register-objectevent $wc downloadstringcompleted -ea stop | out-null
3333

34-
$name, $json = $_
34+
$name, $json = $_
3535

36-
$url = $json.checkver.url
37-
if(!$url) { $url = $json.homepage }
36+
$url = $json.checkver.url
37+
if(!$url) { $url = $json.homepage }
3838

39-
$state = new-object psobject @{
40-
app = (strip_ext $name);
41-
url = $url;
42-
json = $json;
43-
}
39+
$state = new-object psobject @{
40+
app = (strip_ext $name);
41+
url = $url;
42+
json = $json;
43+
}
4444

45-
$wc.downloadstringasync($url, $state)
45+
$wc.downloadstringasync($url, $state)
4646
}
4747

4848
# wait for all to complete
4949
$in_progress = $queue.length
5050
while($in_progress -gt 0) {
51-
$ev = wait-event
52-
remove-event $ev.sourceidentifier
53-
$in_progress--
54-
55-
$state = $ev.sourceeventargs.userstate
56-
$app = $state.app
57-
$json = $state.json
58-
$url = $state.url
59-
$expected_ver = $json.version
60-
61-
$err = $ev.sourceeventargs.error
62-
$page = $ev.sourceeventargs.result
63-
64-
$regexp = $json.checkver.re
65-
if(!$regexp) { $regexp = $json.checkver }
66-
67-
$regexp = "(?s)$regexp"
68-
69-
write-host "$app`: " -nonewline
70-
71-
if($err) {
72-
write-host "ERROR: $err" -f darkyellow
73-
} else {
74-
if($page -match $regexp) {
75-
$ver = $matches[1]
76-
if($ver -eq $expected_ver) {
77-
write-host "$ver" -f darkgreen
78-
} else {
79-
write-host "$ver" -f darkred -nonewline
80-
write-host " (scoop version is $expected_ver)"
81-
}
82-
83-
} else {
84-
write-host "couldn't match '$regexp' in $url" -f darkred
85-
}
86-
}
51+
$ev = wait-event
52+
remove-event $ev.sourceidentifier
53+
$in_progress--
54+
55+
$state = $ev.sourceeventargs.userstate
56+
$app = $state.app
57+
$json = $state.json
58+
$url = $state.url
59+
$expected_ver = $json.version
60+
61+
$err = $ev.sourceeventargs.error
62+
$page = $ev.sourceeventargs.result
63+
64+
$regexp = $json.checkver.re
65+
if(!$regexp) { $regexp = $json.checkver }
66+
67+
$regexp = "(?s)$regexp"
68+
69+
write-host "$app`: " -nonewline
70+
71+
if($err) {
72+
write-host "ERROR: $err" -f darkyellow
73+
} else {
74+
if($page -match $regexp) {
75+
$ver = $matches[1]
76+
if($ver -eq $expected_ver) {
77+
write-host "$ver" -f darkgreen
78+
} else {
79+
write-host "$ver" -f darkred -nonewline
80+
write-host " (scoop version is $expected_ver)"
81+
}
82+
83+
} else {
84+
write-host "couldn't match '$regexp' in $url" -f darkred
85+
}
86+
}
8787
}
8888

8989
<#
@@ -99,15 +99,15 @@ if(!$regexp) { $regexp = $json.checkver }
9999
$page = $wc.downloadstring($url)
100100
101101
if($page -match $regexp) {
102-
$ver = $matches[1]
103-
if($ver -eq $expected_ver) {
104-
write-host "$ver" -f darkgreen
105-
} else {
106-
write-host "$ver" -f darkred -nonewline
107-
write-host " (scoop version is $expected_ver)"
108-
}
109-
102+
$ver = $matches[1]
103+
if($ver -eq $expected_ver) {
104+
write-host "$ver" -f darkgreen
105+
} else {
106+
write-host "$ver" -f darkred -nonewline
107+
write-host " (scoop version is $expected_ver)"
108+
}
109+
110110
} else {
111-
write-host "couldn't match '$regexp' in $url" -f darkred
111+
write-host "couldn't match '$regexp' in $url" -f darkred
112112
}
113-
#>
113+
#>

bin/install.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ iex (new-object net.webclient).downloadstring($core_url)
1111

1212
# prep
1313
if(installed 'scoop') {
14-
write-host "scoop is already installed. run 'scoop update' to get the latest version." -f red
15-
# don't abort if invoked with iex——that would close the PS session
16-
if($myinvocation.commandorigin -eq 'Internal') { return } else { exit 1 }
14+
write-host "scoop is already installed. run 'scoop update' to get the latest version." -f red
15+
# don't abort if invoked with iex——that would close the PS session
16+
if($myinvocation.commandorigin -eq 'Internal') { return } else { exit 1 }
1717
}
1818
$dir = ensure (versiondir 'scoop' 'current')
1919

bin/refresh.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ echo 'creating shim...'
1616
shim "$dest\bin\scoop.ps1" $false
1717

1818
ensure_scoop_in_path
19-
success 'scoop was refreshed!'
19+
success 'scoop was refreshed!'

bin/scoop.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ $commands = commands
1212

1313
if (@($null, '-h', '--help', '/?') -contains $cmd) { exec 'help' $args }
1414
elseif ($commands -contains $cmd) { exec $cmd $args }
15-
else { "scoop: '$cmd' isn't a scoop command. See 'scoop help'"; exit 1 }
15+
else { "scoop: '$cmd' isn't a scoop command. See 'scoop help'"; exit 1 }

bin/test.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
invoke-pester $psscriptroot\..\test
1+
invoke-pester $psscriptroot\..\test

bin/uninstall.ps1

+29-29
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ param($global)
66
. "$psscriptroot\..\lib\manifest.ps1"
77

88
if($global -and !(is_admin)) {
9-
"ERROR: you need admin rights to uninstall globally"; exit 1
9+
"ERROR: you need admin rights to uninstall globally"; exit 1
1010
}
1111

1212
warn 'this will uninstall scoop and all the programs that have been installed with scoop!'
@@ -15,47 +15,47 @@ if($yn -notlike 'y*') { exit }
1515

1616
$errors = $false
1717
function do_uninstall($app, $global) {
18-
$version = current_version $app $global
19-
$dir = versiondir $app $version $global
20-
$manifest = installed_manifest $app $version $global
21-
$install = install_info $app $version $global
22-
$architecture = $install.architecture
18+
$version = current_version $app $global
19+
$dir = versiondir $app $version $global
20+
$manifest = installed_manifest $app $version $global
21+
$install = install_info $app $version $global
22+
$architecture = $install.architecture
2323

24-
echo "uninstalling $app"
25-
run_uninstaller $manifest $architecture $dir
26-
rm_shims $manifest $global
27-
env_rm_path $manifest $dir $global
28-
env_rm $manifest $global
24+
echo "uninstalling $app"
25+
run_uninstaller $manifest $architecture $dir
26+
rm_shims $manifest $global
27+
env_rm_path $manifest $dir $global
28+
env_rm $manifest $global
2929

30-
$appdir = appdir $app $global
31-
try {
32-
rm -r -force $appdir -ea stop
33-
} catch {
34-
$errors = $true
35-
warn "couldn't remove $(friendly_path $appdir): $_.exception"
36-
}
30+
$appdir = appdir $app $global
31+
try {
32+
rm -r -force $appdir -ea stop
33+
} catch {
34+
$errors = $true
35+
warn "couldn't remove $(friendly_path $appdir): $_.exception"
36+
}
3737
}
3838
function rm_dir($dir) {
39-
try {
40-
rm -r -force $dir -ea stop
41-
} catch {
42-
abort "couldn't remove $(friendly_path $dir): $_"
43-
}
39+
try {
40+
rm -r -force $dir -ea stop
41+
} catch {
42+
abort "couldn't remove $(friendly_path $dir): $_"
43+
}
4444
}
4545

4646
# run uninstallation for each app if necessary, continuing if there's
4747
# a problem deleting a directory (which is quite likely)
4848
if($global) {
49-
installed_apps $true | % { # global apps
50-
do_uninstall $_ $true
51-
}
49+
installed_apps $true | % { # global apps
50+
do_uninstall $_ $true
51+
}
5252
}
5353
installed_apps $false | % { # local apps
54-
do_uninstall $_ $false
54+
do_uninstall $_ $false
5555
}
5656

5757
if($errors) {
58-
abort "not all apps could be deleted. try again or restart"
58+
abort "not all apps could be deleted. try again or restart"
5959
}
6060

6161
rm_dir $scoopdir
@@ -64,4 +64,4 @@ if($global) { rm_dir $globaldir }
6464
remove_from_path (shimdir $false)
6565
if($global) { remove_from_path (shimdir $true) }
6666

67-
success "scoop has been uninstalled"
67+
success "scoop has been uninstalled"

bucket/7zip.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"homepage": "http://www.7-zip.org/",
3-
"license": "http://www.7-zip.org/license.txt",
4-
"version": "9.38",
5-
"architecture": {
6-
"64bit": {
7-
"url": "http://www.7-zip.org/a/7z938-x64.msi",
8-
"hash": "7c8e873991c82ad9cfcdbdf45254ea6101e9a645e12977dcd518979e50fdedf3"
9-
},
10-
"32bit": {
11-
"url": "http://www.7-zip.org/a/7z938.msi",
12-
"hash": "c48f13efbde87f370f2a70885df55c1e53f2c791c2007f9587810f915fecc0d8"
13-
}
14-
},
15-
"extract_dir": "Files/7-Zip",
16-
"bin": "7z.exe",
17-
"checkver": "Download 7-zip ([^\\ ]+)"
2+
"homepage": "http://www.7-zip.org/",
3+
"license": "http://www.7-zip.org/license.txt",
4+
"version": "9.38",
5+
"architecture": {
6+
"64bit": {
7+
"url": "http://www.7-zip.org/a/7z938-x64.msi",
8+
"hash": "7c8e873991c82ad9cfcdbdf45254ea6101e9a645e12977dcd518979e50fdedf3"
9+
},
10+
"32bit": {
11+
"url": "http://www.7-zip.org/a/7z938.msi",
12+
"hash": "c48f13efbde87f370f2a70885df55c1e53f2c791c2007f9587810f915fecc0d8"
13+
}
14+
},
15+
"extract_dir": "Files/7-Zip",
16+
"bin": "7z.exe",
17+
"checkver": "Download 7-zip ([^\\ ]+)"
1818
}

bucket/apache.json

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
2-
"homepage": "http://www.apachelounge.com",
3-
"version": "2.4.12",
4-
"license": "Apache 2.0",
5-
"url": "http://www.apachelounge.com/download/VC11/binaries/httpd-2.4.12-win32-VC11.zip",
6-
"hash": "DBA963DB9819CD2AE3CB0E970F4159E199981F9BA0B33C537395C6AE1222951D",
7-
"extract_dir": "Apache24",
8-
"bin": [
9-
"bin\\ab.exe",
10-
"bin\\abs.exe",
11-
"bin\\htcacheclean.exe",
12-
"bin\\htdbm.exe",
13-
"bin\\htdigest.exe",
14-
"bin\\htpasswd.exe",
15-
"bin\\httpd.exe",
16-
"bin\\httxt2dbm.exe",
17-
"bin\\logresolve.exe",
18-
"bin\\rotatelogs.exe"
19-
],
20-
"post_install": "
2+
"homepage": "http://www.apachelounge.com",
3+
"version": "2.4.12",
4+
"license": "Apache 2.0",
5+
"url": "http://www.apachelounge.com/download/VC11/binaries/httpd-2.4.12-win32-VC11.zip",
6+
"hash": "DBA963DB9819CD2AE3CB0E970F4159E199981F9BA0B33C537395C6AE1222951D",
7+
"extract_dir": "Apache24",
8+
"bin": [
9+
"bin\\ab.exe",
10+
"bin\\abs.exe",
11+
"bin\\htcacheclean.exe",
12+
"bin\\htdbm.exe",
13+
"bin\\htdigest.exe",
14+
"bin\\htpasswd.exe",
15+
"bin\\httpd.exe",
16+
"bin\\httxt2dbm.exe",
17+
"bin\\logresolve.exe",
18+
"bin\\rotatelogs.exe"
19+
],
20+
"post_install": "
2121
# set directory in httpd.conf
2222
$conf = \"$dir/conf/httpd.conf\"
2323
$root=(scoop which httpd | split-path -res -par | split-path -par) -replace '\\\\', '/';
2424
(gc $conf) | % { $_ -replace 'c:/Apache24', \"$root\" } | sc $conf
2525
",
26-
"checkver": {
27-
"url": "http://www.apachelounge.com/download/",
28-
"re": "Apache ([0-9\\.]+) Win64"
29-
}
26+
"checkver": {
27+
"url": "http://www.apachelounge.com/download/",
28+
"re": "Apache ([0-9\\.]+) Win64"
29+
}
3030
}

0 commit comments

Comments
 (0)