From adfea091f816cc2f4007e99b6b2be35a821857da Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 8 Apr 2009 00:00:00 +0200 Subject: the first usable version. I was not using git yet, this was a simple backup --- fm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 fm (limited to 'fm') diff --git a/fm b/fm new file mode 100755 index 00000000..7133192f --- /dev/null +++ b/fm @@ -0,0 +1,41 @@ +#!/usr/bin/ruby + +def File::resolve_symlink( path = __FILE__ ) + path = readlink(path) while symlink?(path) + expand_path(path) +end + +def require_from_here ( *list ) + require File.join( FM_DIR, *list ) +end + +$: << FM_DIR = File::dirname(File::resolve_symlink) + +require 'ftools' +require 'pp' + +require_from_here 'interface/ncurses.rb' +require_from_here 'code/fm.rb' +require_from_here 'code/keys.rb' +require_from_here 'code/types.rb' +require_from_here 'code/extensions.rb' +include Interface + +ERROR_STREAM = File.open('/tmp/errorlog', 'a') +def log(obj) + $stdout = ERROR_STREAM + pp obj + $stdout.flush + $stdout = STDOUT + obj +end + +END { + closei + Fm.dump + ERROR_STREAM.close +} + +Fm.initialize +Fm.main_loop + -- cgit 1.4.1-2-gfad0