From 3008db8a1521eab99851a9ee6b2b6c2b7c0871e9 Mon Sep 17 00:00:00 2001 From: Grisha K Date: Sun, 22 Sep 2013 14:33:25 +0300 Subject: [PATCH] Add subcommand for control napokaz updates; --- manage.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/manage.py b/manage.py index fb21dbb..0571ba1 100755 --- a/manage.py +++ b/manage.py @@ -34,6 +34,16 @@ def sub(name, **kw): sub('bootstrap', help='install dependencies')\ .exe(lambda a: sh('pip install -r requirements.txt --no-index')) + sub('napokaz', help='napokaz updater')\ + .arg('--push', action='store_true')\ + .arg('--init', action='store_true')\ + .exe(lambda a: sh( + 'git remote add napokaz git@github.com:naspeh/napokaz.git' + if a.init else + 'git subtree %s -P data/s/napokaz/src napokaz master' + % ('push' if a.push else 'pull --squash') + )) + args = parser.parse_args(args) if not hasattr(args, 'sub'): parser.print_usage()