Skip to content
Browse files

twee 1.7.1

  • Loading branch information...
1 parent 111b23a commit 522016efc355351e8f8eea2647d290629b85e136 @mistydemeo committed Feb 14, 2013
Showing with 70 additions and 0 deletions.
  1. +5 −0 README.md
  2. +65 −0 twee.rb
View
5 README.md
@@ -12,6 +12,11 @@ brew tap mistydemeo/formulae
Formulae available
==================
+twee
+----
+
+A commandline compiler for [Twine](http://gimcrackd.com/etc/src/).
+
lensfun
-------
View
65 twee.rb
@@ -0,0 +1,65 @@
+require 'formula'
+
+class Twee < Formula
+ homepage 'http://gimcrackd.com/etc/src/'
+ url 'http://twee.googlecode.com/files/twee-1.7.1.zip'
+ sha1 'fd9e95b6486e6cfbd20196bbad38920a50ce824e'
+ head 'https://github.com/tweecode/twee.git'
+
+ # Fixes scripts so that they find their libs regardless of where
+ # the bin symlinks are installed to
+ # Submitted upstream as https://github.com/tweecode/twee/pull/6
+ def patches; DATA; end
+
+ def install
+ libexec.install Dir['*']
+
+ %w[twee toward untwee].each do |exec|
+ # Nope, they're not +x
+ chmod 0775, libexec/exec
+ bin.install_symlink libexec/exec
+ end
+ end
+end
+
+__END__
+diff --git a/toward b/toward
+index dfa00af..d81cf21 100644
+--- a/toward
++++ b/toward
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env python
+
+ import sys, os, getopt, glob
+-scriptPath = os.path.realpath(os.path.dirname(sys.argv[0]))
++scriptPath = os.path.dirname(os.path.realpath(__file__))
+ sys.path.append(scriptPath + os.sep + 'lib')
+ from project import Project
+
+diff --git a/twee b/twee
+index f25825f..7d72fe5 100644
+--- a/twee
++++ b/twee
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env python
+
+ import sys, os, getopt, glob
+-scriptPath = os.path.realpath(os.path.dirname(sys.argv[0]))
++scriptPath = os.path.dirname(os.path.realpath(__file__))
+ sys.path.append(scriptPath + os.sep + 'lib')
+ from tiddlywiki import TiddlyWiki
+
+diff --git a/untwee b/untwee
+index 1f2a7ec..71745fb 100644
+--- a/untwee
++++ b/untwee
+@@ -1,7 +1,8 @@
+ #!/usr/bin/env python
+
+ import sys, os
+-sys.path.append(os.getcwd() + os.sep + 'lib')
++scriptPath = os.path.dirname(os.path.realpath(__file__))
++sys.path.append(scriptPath + os.sep + 'lib')
+ from tiddlywiki import TiddlyWiki
+
+ def usage():

0 comments on commit 522016e

Please sign in to comment.
Something went wrong with that request. Please try again.