mirror of https://gerrit.osmocom.org/osmo-dev
g: use python to pass args transparently
Change-Id: Ib02058a73d2959c5ea5073924b2c38195bbe08fc
This commit is contained in:
parent
a19ed1f2d6
commit
9316ee7810
24
src/g
24
src/g
|
@ -1,7 +1,17 @@
|
|||
#!/bin/sh
|
||||
for gitdir in */.git ; do
|
||||
dir="$(dirname "$gitdir")"
|
||||
echo
|
||||
echo "===== $dir ====="
|
||||
git -C "$dir" $@
|
||||
done
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
git_subdirs = []
|
||||
|
||||
for subdir in os.listdir():
|
||||
if not os.path.isdir(os.path.join(subdir, '.git')):
|
||||
continue
|
||||
|
||||
print('\n===== %s =====' % subdir)
|
||||
sys.stdout.flush()
|
||||
subprocess.call(['git', '-C', subdir] + sys.argv[1:])
|
||||
sys.stdout.flush()
|
||||
sys.stderr.flush()
|
||||
|
|
Loading…
Reference in New Issue