Sha256: a9f74589f561237c3ef0027dce88ba68695abf870e7a2368477bb4c147892106
Contents?: true
Size: 1.07 KB
Versions: 2
Compression:
Stored size: 1.07 KB
Contents
#!/usr/bin/env ruby require 'optparse' require_relative '../lib/fucking_shell_scripts' options = {} OptionParser.new do |opts| opts.banner = "Usage: fss [options] type" opts.on('--build', 'Only build the server' ) do |build| options[:build] = true end opts.on('--configure', 'Only configure the server' ) do |configure| options[:configure] = true end opts.on('--instance-id ID', 'An exiting AWS instance ID' ) do |id| options[:instance_id] = id end opts.on('-h', '--help', 'Display this screen' ) do puts opts exit end opts.on('-v', '--version', 'Show version' ) do puts FuckingShellScripts::VERSION exit end end.parse! options.merge!(type: ARGV.first) abort("Specify the type of server to build/configure as the first argument (ie. fss app-server)") unless options[:type] cli = FuckingShellScripts::CLI.new(options) if options[:build] cli.build elsif options[:configure] abort("Specify the server instance ID to configure using the --instance-id option") unless options[:instance_id] cli.configure else cli.bootstrap end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fucking_shell_scripts-1.1 | bin/fss |
fucking_shell_scripts-1.0 | bin/fss |