From fff104e45e6fd1a91bd2c335d5cf2d4e1612f523 Mon Sep 17 00:00:00 2001 From: Domenico Andreoli Date: Tue, 13 Jun 2017 19:34:00 +0200 Subject: [PATCH] Add a shortcut to invoke git on all the sub-repos (#29) --- prepare-build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/prepare-build.sh b/prepare-build.sh index 58e6dd5..33fffb1 100755 --- a/prepare-build.sh +++ b/prepare-build.sh @@ -39,6 +39,16 @@ if [[ "$1" == "update" ]]; then pull_dir $d done pull_dir src/oe-core/bitbake +elif [[ "$1" == "git-"* ]]; then + base=$(dirname $0) + gitcmd=${1:4} # drop git- + shift + for d in $base $base/src/* $base/src/oe-core/bitbake; do + if [ $(git -C $d $gitcmd "$@" | wc -c) -ne 0 ]; then + echo -e "\e[35mgit -C $d $gitcmd $@ \e[39m" + git -C $d $gitcmd "$@" + fi + done # Prepare bitbake else ROOTDIR=`pwd`