Permalink
Browse files

[OS-843] Add a way of automatically pulling down the extra tarball

  • Loading branch information...
JohnSonnenschein committed Jan 4, 2012
1 parent 8803e38 commit 0cc880d77ec0d37b6a5a75b5a57514ce92716672
Showing with 18 additions and 4 deletions.
  1. +10 −3 Makefile
  2. +8 −1 configure
View
@@ -1,4 +1,4 @@
-# Copyright (c) 2010, 2011 Joyent Inc., All rights reserved.
+# Copyright (c) 2010-2012 Joyent Inc., All rights reserved.
ROOT=$(PWD)
PROTO=$(ROOT)/proto
@@ -7,7 +7,9 @@ PATH=/opt/local/bin:/opt/local/sbin:/opt/local/gcc34/bin:/usr/xpg4/bin:/usr/bin:
LOCAL_SUBDIRS:=$(shell ls projects/local)
MANIFEST=manifest.gen
OVERLAYS:=$(shell cat overlay/order)
-
+ifeq ($(EXTRA_TARBALL),)
+EXTRA_TARBALL:=$(ROOT)/$(shell ls illumos-extra*.tgz | tail -n1)
+endif
world: 0-illumos-stamp 0-extra-stamp 0-livesrc-stamp 0-local-stamp \
0-tools-stamp 0-man-stamp 0-devpro-stamp
@@ -64,9 +66,14 @@ update:
0-extra-stamp:
ifeq ($(EXTRA_TARBALL),)
+ echo $(EXTRA_TARBALL)
(cd $(ROOT)/projects/illumos-extra && gmake DESTDIR=$(PROTO) install)
else
- (cd $(PROTO)/../ && gtar -zxf $(EXTRA_TARBALL) proto/)
+ifneq ($(NO_EXTRA_TARBALL),)
+ (cd $(ROOT)/projects/illumos-extra && gmake DESTDIR=$(PROTO) install)
+else
+ (cd $(PROTO)/../ && gtar -zxf $(EXTRA_TARBALL) proto/)
+endif
endif
touch 0-extra-stamp
View
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2010,2011 Joyent Inc.
+# Copyright (c) 2010-2012 Joyent Inc.
#
set -o errexit
@@ -142,6 +142,13 @@ if [ ! -f "projects/illumos/usr/src/tools/env/illumos.sh" ]; then
fi
fi
+if [[ -n ${ILLUMOS_EXTRA_TARBALL_URL} && -z ${NO_EXTRA_TARBALL} ]]; then
+ EXTRA_TARBALL=$(curl -k ${ILLUMOS_EXTRA_TARBALL_URL} | grep href | tail -n1 | cut -d '"' -f2)
+ curl -k -O ${ILLUMOS_EXTRA_TARBALL_URL}/${EXTRA_TARBALL}
+ if [[ $? != 0 ]]; then
+ EXTRA_TARBALL=""
+ fi
+fi
if [[ ! -f "projects/illumos-extra/Makefile" && -z $EXTRA_TARBALL ]]; then
echo " +--> Getting illumos-extra source tree..."
if [ -z "${GET_ILLUMOS_EXTRA}" ]; then

0 comments on commit 0cc880d

Please sign in to comment.