about summary refs log tree commit diff stats
path: root/fm
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-04-08 00:00:00 +0200
committerhut <hut@lavabit.com>2009-04-08 00:00:00 +0200
commitadfea091f816cc2f4007e99b6b2be35a821857da (patch)
treebab1dc55cda8e2da2f8168d2d85278734b26f75e /fm
downloadranger-adfea091f816cc2f4007e99b6b2be35a821857da.tar.gz
the first usable version. v0.1.0
I was not using git yet, this was a simple backup
Diffstat (limited to 'fm')
-rwxr-xr-xfm41
1 files changed, 41 insertions, 0 deletions
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
+