summaryrefslogtreecommitdiff
path: root/scripts/paste-server
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/paste-server')
-rwxr-xr-xscripts/paste-server19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/paste-server b/scripts/paste-server
new file mode 100755
index 0000000..7ec637d
--- /dev/null
+++ b/scripts/paste-server
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+import os
+import sys
+
+try:
+ here = __file__
+except NameError:
+ # Python 2.2
+ here = sys.argv[0]
+
+relative_paste = os.path.join(
+ os.path.dirname(os.path.dirname(os.path.abspath(here))), 'paste')
+
+
+if os.path.exists(relative_paste):
+ sys.path.insert(0, os.path.dirname(relative_paste))
+
+from paste import server
+sys.exit(server.run_commandline(sys.argv[1:]))