File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 44# keep detailed records of where the code came from.
55
66TARGET_ARCH=$1
7+ BOARD=$2
8+ COMMIT=$3
79
810if [ ! -n " $TARGET_ARCH " ]; then
9- echo " Usage: $0 <arch> [board]"
11+ echo " Usage: $0 <arch> [board] [commit] "
1012 exit 1
1113fi
1214
@@ -50,17 +52,28 @@ echo "Beginning $TARGET_ARCH build with $CROSS_TOOL_VERSION..."
5052TMP=" /tmp/$TARGET_ARCH -build"
5153GIT_REPO=" git://git.denx.de/u-boot.git"
5254
53- echo " Cloning sources..."
54- git clone $GIT_REPO $TMP
55+ if ! [ -d " $TMP " ]; then
56+ echo " Cloning sources..."
57+ git clone $GIT_REPO $TMP
58+ else
59+ echo " Pulling updates..."
60+ # hint: Might want to comment this out if you're git blameing on u-boot in $TMP
61+ git -C $TMP pull --rebase
62+ fi
63+
64+ if [ $# -ge 2 ]; then
65+ echo " Checking out u-boot $COMMIT "
66+ git -C $TMP checkout $COMMIT
67+ fi
5568
5669echo " Calculating dates..."
5770GIT_DATE=$( git -C $TMP log -1 --format=%cd)
5871GIT_HASH=$( git -C $TMP log -1 --format=%H)
5972
6073echo " Locating work..."
6174WORK_QUEUE=$( find $TARGET_ARCH / -mindepth 1 -type d)
62- if [ $# -eq 2 ]; then
63- WORK_QUEUE=" $TARGET_ARCH /$2 "
75+ if [ $# -ge 2 ]; then
76+ WORK_QUEUE=" $TARGET_ARCH /$BOARD "
6477fi
6578
6679for dir in $WORK_QUEUE ; do
You can’t perform that action at this time.
0 commit comments