diff --git a/.gitignore b/.gitignore index 3dc1e66..d0056c2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /libs/ /.crystal/ /.shards/ +guardian # Libraries don't need dependency lock diff --git a/guardian b/guardian deleted file mode 100755 index 1917857..0000000 Binary files a/guardian and /dev/null differ diff --git a/src/guardian.cr b/src/guardian.cr index 83f621f..19a163d 100644 --- a/src/guardian.cr +++ b/src/guardian.cr @@ -1,18 +1,23 @@ require "./guardian/*" require "option_parser" -options_parser = OptionParser.new do |options| - options.on "init", "Generates the .guardian.yml file" do - Guardian::Generator.new.generate - exit - end +case ARGV[0]? +when "init" + puts "\"init\" has been deprecated please use: -i or --init" + Guardian::Generator.new.generate + exit +else + OptionParser.parse! do |options| + options.on "-i", "--init", "Generates the .guardian.yml file" do + Guardian::Generator.new.generate + exit + end - options.on "-v", "--version", "Shows the version" do - puts "Guardian (#{Guardian::VERSION})" - exit + options.on "-v", "--version", "Shows the version" do + puts "Guardian (#{Guardian::VERSION})" + exit + end end end -options_parser.parse(ARGV.clone) - Guardian::Watcher.new