David Hendricks has uploaded this change for review.

View Change

buildgcc: Add option to quit after the download step

This adds a longopt that tells buildgcc to stop after downloading and
verifying packages. Useful for mirroring crossgcc dependencies.

Change-Id: Ie1dcf25d33612737512ec7a0c3611b3d4cadeb82
Signed-off-by: David Hendricks <dhendrix@fb.com>
---
M util/crossgcc/buildgcc
1 file changed, 7 insertions(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/30760/1
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index d5d68c7..7407d0e 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -588,6 +588,7 @@
printf " (for RPM builds, default unset)\n"
printf " [-P|--package <package>] Build a specific package: GCC, CLANG, IASL, GDB\n"
printf " (defaults to $PACKAGE)\n"
+ printf " [--download-only] quit after downloading and verifying packages\n"
printf "GCC specific options:\n"
printf " [-b|--bootstrap] bootstrap the host compiler before building\n"
printf " the cross compiler\n"
@@ -938,7 +939,7 @@
getoptbrand="$(getopt -V 2>/dev/null | sed -e '1!d' -e 's,^\(......\).*,\1,')"
if [ "${getoptbrand}" = "getopt" ]; then
# Detected GNU getopt that supports long options.
- args=$(getopt -l version,help,clean,directory:,bootstrap,bootstrap-only,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,nocolor -o Vhcd:bBp:l:P:j:D:tSys:un -- "$@")
+ args=$(getopt -l version,help,clean,directory:,bootstrap,bootstrap-only,platform:,languages:,package:,jobs:,destdir:,savetemps,scripting,ccache,supported:,urls,download-only,nocolor -o Vhcd:bBp:l:P:j:D:tSys:un -- "$@")
getopt_ret=$?
eval set -- "$args"
else
@@ -972,6 +973,7 @@
-y|--ccache) shift; USECCACHE=1;;
-s|--supported) shift; PRINTSUPPORTED="$1"; shift;;
-u|--urls) shift; printf "%s\n" "$ALL_ARCHIVES"; exit 0;;
+ --download-only) shift; DOWNLOADONLY=1; shift;;
-n|--nocolor) shift; \
unset red RED green GREEN blue BLUE cyan CYAN NC;;
--) shift; break;;
@@ -1248,6 +1250,10 @@
done
printf "Downloaded tarballs ... ${green}ok${NC}\n"

+if [ -n "$DOWNLOADONLY" ]; then
+ exit 0
+fi
+
printf "Unpacking and patching ...\n"
for P in $PACKAGES; do
unpack_and_patch $P || exit 1

To view, visit change 30760. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie1dcf25d33612737512ec7a0c3611b3d4cadeb82
Gerrit-Change-Number: 30760
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks@gmail.com>
Gerrit-MessageType: newchange