]> Zhao Yanbai Git Server - minix.git/commitdiff
CREATE_IMAGE_ONLY option added to releasetools/x86_hdimage.sh
authorKoustubha Bhat <ksbhat@live.com>
Tue, 10 Jun 2014 15:05:29 +0000 (17:05 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:06:04 +0000 (17:06 +0200)
releasetools/x86_hdimage.sh

index 1dcef4bbd51ae706db3d8fb6b55d9aebb0f5bfe8..7055a4c9c8fc5e3b1f42e2d801e92094a6b479a1 100755 (executable)
@@ -10,6 +10,7 @@ set -e
 : ${FSTAB=${DESTDIR}/etc/fstab}
 : ${BUILDVARS=}
 : ${BUILDSH=build.sh}
+: ${CREATE_IMAGE_ONLY=0}
 
 # Where the kernel & boot modules will be
 MODDIR=${DESTDIR}/multiboot
@@ -40,22 +41,41 @@ done
 
 : ${IMG=minix_x86.img}
 
+#
+# Are we going to build the minix sources?
+#
+
+if [ ${CREATE_IMAGE_ONLY} -eq 1 ]
+then
+       if [ ! -d ${DESTDIR} ]
+       then
+               echo "Minix source code does'nt appear to have been built."
+               echo "Please try with \$CREATE_IMAGE_ONLY set to 0."
+               exit 1
+       fi
+fi
+
 #
 # Artifacts from this script are stored in the IMG_DIR
 #
 rm -rf ${IMG_DIR} ${IMG}
 mkdir -p ${IMG_DIR} ${CDFILES}
 
-#
-# Remove the generated files to allow us call build.sh without '-V SLOPPY_FLIST=yes'.
-#
-rm -f ${FSTAB}
+if [ ${CREATE_IMAGE_ONLY} -eq 0 ]
+then
+       echo "Going to build Minix source code..."
+       #
+       # Remove the generated files to allow us call build.sh without '-V SLOPPY_FLIST=yes'.
+       #
+       rm -f ${FSTAB}
+
+       #
+       # Now start the build.
+       #
+       export CPPFLAGS=${FLAG}
+       sh ${BUILDSH} -j ${JOBS} -m ${ARCH} -O ${OBJ} -D ${DESTDIR} ${BUILDVARS} -U -u distribution
 
-#
-# Now start the build.
-#
-export CPPFLAGS=${FLAG}
-sh ${BUILDSH} -j ${JOBS} -m ${ARCH} -O ${OBJ} -D ${DESTDIR} ${BUILDVARS} -U -u distribution
+fi
 
 if [ "x${ISOMODE}" = "x1" ]
 then