From a217a82444aed528a2760521056b467cf8215650 Mon Sep 17 00:00:00 2001 From: eroen Date: Thu, 14 Nov 2013 11:34:21 +0100 Subject: initial commit Commands are passed through --- .gitignore | 3 +++ bin/git-annex-wrapper | 17 +++++++++++++++++ ga_wrapper/__init__.py | 0 ga_wrapper/wrapper.py | 22 ++++++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 .gitignore create mode 100755 bin/git-annex-wrapper create mode 100644 ga_wrapper/__init__.py create mode 100644 ga_wrapper/wrapper.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..008af35 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +__pycache__ +*.pyc +*.pyo diff --git a/bin/git-annex-wrapper b/bin/git-annex-wrapper new file mode 100755 index 0000000..eddaf0f --- /dev/null +++ b/bin/git-annex-wrapper @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +''' +By eroen, 2013 + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. +''' + +from ga_wrapper import wrapper + + +def main(): + wrapper.generic_wrapper() + +if __name__ == '__main__': + main() diff --git a/ga_wrapper/__init__.py b/ga_wrapper/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ga_wrapper/wrapper.py b/ga_wrapper/wrapper.py new file mode 100644 index 0000000..397d0cc --- /dev/null +++ b/ga_wrapper/wrapper.py @@ -0,0 +1,22 @@ +''' +By eroen, 2013 + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. +''' + +import sys +import subprocess + + +def fallthrough(args): + proc = subprocess.Popen(args) + return proc.wait() + + +def generic_wrapper(): + args = sys.argv + if args[0].endswith('git-annex-wrapper'): + del(args[0]) + return fallthrough(args) -- cgit v1.2.1