bin/dokkit in dokkit-0.1.1 vs bin/dokkit in dokkit-0.2.0
- old
+ new
@@ -1,53 +1,63 @@
+#
+# File 'dokkit' created on 09 ott 2007 at 15:57:46.
#
-# Commandline launcher for Dokkit, (c)2006 Andrea Fazzi (and contributors)
+# See 'dokkit.rb' or LICENSE for licence information.
+#
+# (c)2006, 2007 Andrea Fazzi <andrea.fazzi@alca.le.it> (and contributors).
#
+# Commandline launcher for Dokkit.
# Get set up with library paths, however we're installed.
+#
-def croak
- puts "Cannot locate Dokkit libraries - Do you need to set $DOKKIT_LIB ?"
- exit(1)
-end
+=begin
-begin
- require 'rubygems'
-rescue LoadError
- # just ignore, don't use gems
-end
+= NAME
+dokkit - Ruby Documentation toolKit
-fail = false
+= SYNOPSIS
-dokkit_lib = nil
+dokkit [options] [task1] .. [taskN]
+= DESCRIPTION
+
+dokkit is a documentation environment. It is based on rote and it uses deplate to generate output in a large variety of formats (tex, html, docbook, plain text, ...).
+
+For more information please execute:
+
+$ dokkit --help
+
+= OPTIONS
+
+For a complete list of the options please execute:
+
+$ dokkit --help
+
+= AUTHOR
+
+Andrea Fazzi <andrea.fazzi@alca.le.it>
+
+= SEE ALSO
+
+ruby(1)
+
+=end
+
+def croak
+ puts "Cannot locate Dokkit libraries - Do you need to set $DOKKIT_LIB?"
+ exit(1)
+end
+
begin
- require 'dokkit'
- require 'dokkit/app'
-
- # find this later
- dokkit_lib = nil
+ require 'rubygems'
rescue LoadError
- unless fail || !(dokkit_lib = ENV['DOKKIT_LIB'])
- $: << dokkit_lib
- # at least we can know this now...
- builtin = File.join(dokkit_lib,'dokkit/builtin.rake')
- fail = true # next time.
- retry
- else
- croak
- end
+ nil # just ignore, don't use gems
end
-# If we're loaded via RubyGems or some such we need to locate
-# the builtin rakefile.
-unless dokkit_lib
- $:.each { |it|
- if File.exists?(File.join(it,'dokkit/builtin.rake'))
- dokkit_lib = it
- break
- end
- }
-end
+require 'dokkit'
+require 'dokkit/app'
-croak unless dokkit_lib
+croak unless Dokkit.dokkit_lib
-Dokkit::Application.new(dokkit_lib).run
+Dokkit.application.run
+