Permalink
Browse files

Add --help to build script.

  • Loading branch information...
1 parent 9bcc868 commit 869e5025d8bdbf989240a79caecf2ef3e6ae8d09 @mwbrooks committed Jan 10, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 build
View
5 build
@@ -7,7 +7,7 @@ PROFILE_PATH = "util/profiles"
# TODO: print out build command line if no args provided.
def show_usage
- STDERR.puts "\nusage: ./build [ profile=<name> ] [ --minify ] [--generate-doc]"
+ STDERR.puts "\nusage: ./build [ profile=<name> ] [ --minify ] [ --generate-docs ]"
STDERR.puts "\nsupported profiles are:"
Dir.chdir(PROFILE_PATH) do
STDERR.puts Dir['*.js'].map {|profile| "\t#{profile.sub(/\.js/, '')}"}
@@ -25,7 +25,8 @@ ARGV.each do |arg|
case arg
when "--minify" then minify = true
when /^profile=(.*)$/ then profile = $1
- when "--generate-doc" then docs = true
+ when "--generate-docs" then docs = true
+ when "--help" then show_usage
else
STDERR.puts("Invalid parameter '#{arg}'") unless arg == "--help"
show_usage

0 comments on commit 869e502

Please sign in to comment.