diff --git a/u-boot/tools/build b/u-boot/tools/build index 410bae7..083a35a 100755 --- a/u-boot/tools/build +++ b/u-boot/tools/build @@ -6,7 +6,7 @@ TARGET_ARCH=$1 if [ ! -n "$TARGET_ARCH" ]; then - echo "Usage: $0 [board]" + echo "Usage: $0 [board|all] [commit]" exit 1 fi @@ -52,13 +52,17 @@ GIT_REPO="git://git.denx.de/u-boot.git" echo "Cloning sources..." git clone $GIT_REPO $TMP +if [ $# -eq 3 ]; then + git -C $TMP checkout $3 +fi GIT_DATE=$(git -C $TMP log -1 --format=%cd) GIT_HASH=$(git -C $TMP log -1 --format=%H) -WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d) -if [ $# -eq 2 ]; then +if [ $# -ge 2 -a "$2" != all ]; then WORK_QUEUE="$TARGET_ARCH/$2" +else + WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d) fi for dir in $WORK_QUEUE; do