.irbrc
author Mahlon E. Smith <mahlon@martini.nu>
Wed, 01 Feb 2017 15:35:35 -0800
changeset 12 3cc813140c80
parent 6 66beb495a861
permissions -rw-r--r--
First round of modernizing after a long absence. Much work to be done.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     1
#!/usr/bin/ruby -*- ruby -*-
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     2
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     3
BEGIN {
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     4
	require 'pathname'
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     5
	basedir = Pathname.new( __FILE__ ).dirname.expand_path
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     6
	libdir = basedir + "lib"
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     7
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     8
	puts ">>> Adding #{libdir} to load path..."
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     9
	$LOAD_PATH.unshift( libdir.to_s )
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    10
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    11
	require basedir + 'utils'
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    12
	include UtilityFunctions
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    13
}
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    14
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    15
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    16
# Try to require the 'thingfish' library
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    17
begin
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    18
	require 'ezmlm'
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    19
rescue => e
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    20
	$stderr.puts "Ack! Ezmlm library failed to load: #{e.message}\n\t" +
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    21
		e.backtrace.join( "\n\t" )
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    22
end
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    23