Add -p option to build specitif cord project

Change-Id: Ib2805fad18ed41154e0d265b6e1e98760aac2cdd
diff --git a/scripts/cord-in-a-box.sh b/scripts/cord-in-a-box.sh
index 4d1bad7..581736c 100755
--- a/scripts/cord-in-a-box.sh
+++ b/scripts/cord-in-a-box.sh
@@ -315,7 +315,7 @@
 #needed, use -n option
 NUM_COMPUTE_NODES=1
 
-while getopts "b:cdfhn:stv" opt; do
+while getopts "b:cdfhn:stvp:" opt; do
   case ${opt} in
     b ) GERRIT_BRANCHES+=("$OPTARG")
       ;;
@@ -337,6 +337,7 @@
       echo "    $0 -s             run initial setup phase only (don't start building CORD)"
       echo "    $0 -t             do install, bring up cord-pod configuration, run E2E test"
       echo "    $0 -v             print CiaB version and exit"
+      echo "    $0 -p             Specific which project you want to build.(rcord, mcord, or ecord)"
       exit 0
       ;;
     n ) NUM_COMPUTE_NODES=$OPTARG
@@ -348,6 +349,21 @@
     v ) echo "$VERSION_STRING ($REPO_BRANCH branch)"
       exit 0
       ;;
+    p ) # Change config files to build specific cord project
+        if [[ $OPTARG == "mcord" ]]
+        then
+            CONFIG=config/mcord_in_a_box.yml
+        elif [[ $OPTARG == "ecord" ]]
+        then
+            CONFIG=config/ecord_in_a_box.yml
+        elif [[ $OPTARG == "rcord" ]]
+        then
+            CONFIG=config/cord_in_a_box.yml
+        else
+            echo "Invalid option: Please select project from rcord, mcord or ecord"
+            exit 1
+        fi
+        ;;
     \? ) echo "Invalid option: -$OPTARG"
       exit 1
       ;;