From fe92dd7962d29fd7b68cc5427ec6b76023d85318 Mon Sep 17 00:00:00 2001 From: Simon Hartcher Date: Sat, 28 Mar 2015 18:29:07 +1100 Subject: [PATCH] Added scoop-home command `scoop home ` opens the homepage for the given app --- libexec/scoop-home.ps1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libexec/scoop-home.ps1 diff --git a/libexec/scoop-home.ps1 b/libexec/scoop-home.ps1 new file mode 100644 index 0000000000..d0e6d76d4d --- /dev/null +++ b/libexec/scoop-home.ps1 @@ -0,0 +1,23 @@ +# Usage: scoop home +# Summary: Opens the app homepage +param($app) + +. "$psscriptroot\..\lib\core.ps1" +. "$psscriptroot\..\lib\help.ps1" +. "$psscriptroot\..\lib\manifest.ps1" +. "$psscriptroot\..\lib\buckets.ps1" + +if($app) { + $manifest, $bucket = find_manifest $app + if($manifest) { + if([string]::isnullorempty($manifest.homepage)) { + abort "could not find homepage in manifest for '$app'" + } + start $manifest.homepage + } + else { + abort "could not find manifest for '$app'" + } +} else { my_usage } + +exit 0 \ No newline at end of file