summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2008-11-26 14:36:58 -0800
committerAdam Jacob <adam@hjksolutions.com>2008-11-26 14:36:58 -0800
commit6c767fcc5a3fd9ea3a210b83c672a23bf19c5b9d (patch)
tree5ab50e7c4b9c16d449c64bed0a4f712557c48905 /bin
downloadohai-6c767fcc5a3fd9ea3a210b83c672a23bf19c5b9d.tar.gz
First commit of ohai
Diffstat (limited to 'bin')
-rw-r--r--bin/ohai44
1 files changed, 44 insertions, 0 deletions
diff --git a/bin/ohai b/bin/ohai
new file mode 100644
index 00000000..35ac641e
--- /dev/null
+++ b/bin/ohai
@@ -0,0 +1,44 @@
+#!/usr/bin/env ruby
+#
+# ./ohai - I'm in ur serverz, showin you the daters
+#
+# Author:: Adam Jacob (<adam@opscode.com>)
+# Copyright:: Copyright (c) 2008 OpsCode, Inc.
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+require 'optparse'
+require 'rubygems'
+#require 'ohai'
+require 'json'
+
+config = {
+ :kthxbye => false
+}
+
+opts = OptionParser.new do |opts|
+ opts.banner = "Usage: #{$0} [-d DIR|-r FILE] (options)"
+ opts.on("-k", "--kthxbye", "LOLcats") do |k|
+ config[:kthxbye] = true
+ end
+ opts.on_tail("-h", "--help", "Show this message") do
+ puts opts
+ exit
+ end
+end
+opts.parse!(ARGV)
+
+if config[:kthxbye]
+ puts JSON.generate({ :lolcat => "http://icanhascheezburger.com/?random" })
+end \ No newline at end of file