summaryrefslogtreecommitdiff
path: root/bin/s3qladm
diff options
context:
space:
mode:
Diffstat (limited to 'bin/s3qladm')
-rwxr-xr-xbin/s3qladm23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/s3qladm b/bin/s3qladm
new file mode 100755
index 0000000..a877af2
--- /dev/null
+++ b/bin/s3qladm
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+'''
+s3qladm - this file is part of S3QL (http://s3ql.googlecode.com)
+
+Copyright (C) 2008-2010 Nikolaus Rath <Nikolaus@rath.org>
+
+This program can be distributed under the terms of the GNU LGPL.
+'''
+
+from __future__ import unicode_literals, division, print_function
+
+import sys
+import os.path
+
+# We are running from the S3QL source directory, make sure
+# that we use modules from this directory
+basedir = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
+if (os.path.exists(os.path.join(basedir, 'setup.py')) and
+ os.path.exists(os.path.join(basedir, 'src', 's3ql', '__init__.py'))):
+ sys.path = [os.path.join(basedir, 'src')] + sys.path
+
+import s3ql.cli.adm
+s3ql.cli.adm.main(sys.argv[1:])