build_inf.sh: temporary set to build debian only
[pti/rtp.git] / scripts / build_inf.sh
index f878883..8b1120a 100755 (executable)
@@ -80,10 +80,13 @@ run_cmd () {
 # Parse cmd options
 #########################################################################
 
-DRYRUN="-n"
+DRYRUN=""
 YP_ARGS="-s"
+YOCTO_ONLY="No"
+CENTOS_ONLY="No"
+DEBIAN_ONLY="Yes"
 
-while getopts "w:b:e:r:unh" OPTION; do
+while getopts "w:ycdnh" OPTION; do
     case ${OPTION} in
         w)
             WORKSPACE=`readlink -f ${OPTARG}`
@@ -92,6 +95,15 @@ while getopts "w:b:e:r:unh" OPTION; do
             DRYRUN="-n"
             YP_ARGS=""
             ;;
+        y)
+            YOCTO_ONLY="Yes"
+            ;;
+        c)
+            CENTOS_ONLY="Yes"
+            ;;
+        d)
+            DEBIAN_ONLY="Yes"
+            ;;
         h)
             help_info
             exit
@@ -180,12 +192,6 @@ build_centos () {
     fi
 }
 
-build_centos_dl () {
-    # Temp for testing the lftools deploy
-    mkdir -p ${WORKSPACE_DEB}/prj_output/
-    wget http://mirror.starlingx.cengn.ca/mirror/starlingx/master/debian/monolithic/latest_build/outputs/iso/starlingx-intel-x86-64-cd.iso -O ${WORKSPACE_DEB}/prj_output/inf-image-debian-all-x86-64.iso
-}
-
 build_debian () {
     if [ -z "${DRYRUN}" ]; then
         msg_step="Debian builds"
@@ -196,7 +202,7 @@ build_debian () {
             run_cmd "Prepare for Debian builds"
         fi
 
-        RUN_CMD="${SCRIPT_DEB} -w ${WORKSPACE_DEB} ${DRYRUN}"
+        RUN_CMD="${SCRIPT_DEB} -w ${WORKSPACE_DEB} -m ${DRYRUN}"
         run_cmd "Start Yocto builds"
 
         echo_step_end
@@ -213,8 +219,15 @@ if [ "$CI" = "true" ]; then
     get_debug_info
 fi
 
-build_yocto
-#build_centos
-build_centos_dl
-#build_debian
+if [ "${YOCTO_ONLY}" == "Yes" ]; then
+    build_yocto
+elif [ "${CENTOS_ONLY}" == "Yes" ]; then
+    build_centos
+elif [ "${DEBIAN_ONLY}" == "Yes" ]; then
+    build_debian
+else
+    build_centos
+    build_yocto
+    build_debian
+fi