From f71a69c19f0e43fd08e95b4e68e8593511553fef Mon Sep 17 00:00:00 2001 From: Luke Sampson Date: Mon, 17 Jun 2013 21:05:27 +1000 Subject: [PATCH] help tweaks --- lib/cmd/install.ps1 | 3 +++ lib/help_comments.ps1 | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/cmd/install.ps1 b/lib/cmd/install.ps1 index 1e0c8804..7083b25f 100644 --- a/lib/cmd/install.ps1 +++ b/lib/cmd/install.ps1 @@ -5,6 +5,9 @@ param($app) . "$(split-path $myinvocation.mycommand.path)\..\core.ps1" . (resolve ../manifest.ps1) +. (resolve ../help_comments.ps1) + +if(!$app) { "ERROR: missing"; my_usage; exit } $manifest = manifest $app if(!$manifest) { abort "couldn't find manifest for '$app'" } diff --git a/lib/help_comments.ps1 b/lib/help_comments.ps1 index 3d681cca..29ceae8d 100644 --- a/lib/help_comments.ps1 +++ b/lib/help_comments.ps1 @@ -11,6 +11,6 @@ function help($text) { $help_lines -replace '(?ms)^# (Help: )?', '' } -function my_usage { - "usage: $(usage (gc $myInvocation.PSCommandPath -raw))" +function my_usage { # gets usage for the calling script + usage (gc $myInvocation.PSCommandPath -raw) } \ No newline at end of file