diff options
author | Sasha Levin <sashal@kernel.org> | 2021-04-12 12:11:23 -0400 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-04-12 12:11:23 -0400 |
commit | 6842c528867a5c04efdeff2b3109aaa18b3841ee (patch) | |
tree | b5d48493e08d1bab687af6c0381eabc4bd93a05d | |
parent | 983702c7b7a16c2fbd1dfe6c25e92fce76b2fe2d (diff) | |
download | stable-tools-6842c528867a5c04efdeff2b3109aaa18b3841ee.tar.gz |
Switch to using git DB for dependency lookups
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rwxr-xr-x | stable-deps | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/stable-deps b/stable-deps index db64328..4e3d175 100755 --- a/stable-deps +++ b/stable-deps @@ -5,28 +5,18 @@ # if [ $# -ne 1 ] && [ $# -ne 2 ]; then - echo "Usage: stable deps <commit sha1> [Max deps to show]" + echo "Usage: stable deps <commit sha1>" exit 1 fi -maxdeps=$2 +STABLE_MAJ_VER=$(grep VERSION Makefile | head -n1 | awk {'print $3'}) +STABLE_MIN_VER=$(grep PATCHLEVEL Makefile | head -n1 | awk {'print $3'}) +cmt=$(git rev-parse $1) -function handle_one { - ((maxdeps--)) - if [ $maxdeps -eq 0 ]; then - exit 1 - fi - - stable commit-in-tree $1 +for i in $(cat ~/deps/v$STABLE_MAJ_VER.$STABLE_MIN_VER/$cmt | awk {'print $1'}); do + stable commit-in-tree $i if [ $? -eq 1 ]; then - return + continue fi - - echo $1 - for i in $(stable-deps.py $1); do - handle_one $i - done -} - -handle_one $1 -exit 0 + git ol $i +done |