aboutsummaryrefslogtreecommitdiffstats
path: root/packages/aspell/aspell-0.50.5/mk-dirs_h.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/aspell/aspell-0.50.5/mk-dirs_h.py')
-rwxr-xr-x[-rw-r--r--]packages/aspell/aspell-0.50.5/mk-dirs_h.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/aspell/aspell-0.50.5/mk-dirs_h.py b/packages/aspell/aspell-0.50.5/mk-dirs_h.py
index e69de29bb2..a487751e81 100644..100755
--- a/packages/aspell/aspell-0.50.5/mk-dirs_h.py
+++ b/packages/aspell/aspell-0.50.5/mk-dirs_h.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+import sys
+
+prefix=sys.argv[1]
+key=sys.argv[2]
+value=sys.argv[3]
+
+while prefix[-1] == '/':
+ prefix = prefix[:-2]
+
+plen = len(prefix)
+
+if value[:plen] == prefix:
+ value = value[plen:]
+ while value[0] == '/':
+ value = value[1:]
+ print "#define " + key + " \"<prefix:" + value + ">\"\n"
+else:
+ print "#define " + key + " \"" + value + "\"\n"