mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-10-04 11:08:19 +00:00
34 lines
872 B
PowerShell
34 lines
872 B
PowerShell
#requires -v 3
|
|
param($cmd)
|
|
|
|
set-strictmode -off
|
|
|
|
. "$psscriptroot\..\lib\core.ps1"
|
|
. "$psscriptroot\..\lib\git.ps1"
|
|
. "$psscriptroot\..\lib\buckets.ps1"
|
|
. (relpath '..\lib\commands')
|
|
|
|
reset_aliases
|
|
|
|
$commands = commands
|
|
if ('--version' -contains $cmd -or (!$cmd -and '-v' -contains $args)) {
|
|
pushd $(versiondir 'scoop' 'current')
|
|
write-host "Current Scoop version:"
|
|
git_log --oneline HEAD -n 1
|
|
write-host ""
|
|
popd
|
|
|
|
buckets | % {
|
|
pushd $(bucketdir $_)
|
|
if(test-path '.git') {
|
|
write-host "'$_' bucket:"
|
|
git_log --oneline HEAD -n 1
|
|
write-host ""
|
|
}
|
|
popd
|
|
}
|
|
}
|
|
elseif (@($null, '--help', '/?') -contains $cmd -or $args -contains '-h') { exec 'help' $args }
|
|
elseif ($commands -contains $cmd) { exec $cmd $args }
|
|
else { "scoop: '$cmd' isn't a scoop command. See 'scoop help'."; exit 1 }
|