added option to make config without running the server
This commit is contained in:
@@ -37,6 +37,16 @@ module Kotatsu
|
|||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
parser.on "-mc", "--make-config", "Creates config file without running kotatsu" do
|
||||||
|
if File.exists?(CONFIG_FILE) == false
|
||||||
|
makeConfig(CONFIG_FILE, CONFIG_DIR)
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
puts "Config already exists"
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
parser.invalid_option do |flag|
|
parser.invalid_option do |flag|
|
||||||
STDERR.puts "ERROR! Not a valid option: #{flag}"
|
STDERR.puts "ERROR! Not a valid option: #{flag}"
|
||||||
STDERR.puts "Use -h or --help for all available options"
|
STDERR.puts "Use -h or --help for all available options"
|
||||||
|
|||||||
Reference in New Issue
Block a user