Skip to content

Instantly share code, notes, and snippets.

@volpe28v
Created March 6, 2012 03:44
Show Gist options
  • Save volpe28v/1983274 to your computer and use it in GitHub Desktop.
Save volpe28v/1983274 to your computer and use it in GitHub Desktop.
ruby用ちょっとしたスクリプトのテンプレート
######################################################
# Usage:
#
# ruby hoge.rb
######################################################
require "yaml"
require "pp"
def main
# if ARGV.size == 0
# puts "ruby hoge.rb"
# exit 1
# end
hoge()
end
def hoge
#do_system("cd xx; ./fuga.sh")
end
def do_system(command)
puts command
result = false
result = system(command)
return result
end
if __FILE__ == $PROGRAM_NAME
main
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment