Install prepared rootstraps
authorHyokeun Jeon <hyokeun.jeon@samsung.com>
Tue, 21 Jun 2022 01:21:40 +0000 (01:21 +0000)
committerHyokeun Jeon <hyokeun.jeon@samsung.com>
Tue, 21 Jun 2022 01:33:08 +0000 (01:33 +0000)
build_qb.sh

index de4459e..85e001a 100755 (executable)
@@ -3,6 +3,9 @@
 SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
 SOURCE_DIR_PREFIX='abs_working_source'
 
+#FIXME: /home/build/
+USER_HOME_DIR=/home/build
+
 function set_global_env() {
     source /share/envs
     result_file="result.log"
@@ -99,8 +102,6 @@ function is_commit_from_branch() {
 
 function install_security_profile() {
     echo "Installing ABS security profiles with platform level"
-    #FIXME: /home/build/
-    USER_HOME_DIR=/home/build
     ${USER_HOME_DIR}/tizen-studio/tools/ide/bin/tizen security-profiles remove --name ABS || true
     ${USER_HOME_DIR}/tizen-studio/tools/ide/bin/tizen \
         security-profiles add \
@@ -112,6 +113,16 @@ function install_security_profile() {
        || true
 }
 
+function install_rootstraps() {
+    prepared_rootstrap_path="$(dirname ${SCRIPT_PATH})/rootstraps"
+    if [ -d ${prepared_rootstrap_path} ]; then
+        for x in `ls ${prepared_rootstrap_path}/*.zip`; do
+            echo "Installing prepared rootstrap ${x}"
+            ${USER_HOME_DIR}/sdk-build/pkg-cli install-file -P ${x} -l ${USER_HOME_DIR}/tizen-studio --force > /dev/null 2>&1
+        done
+    fi
+}
+
 function execute_build() {
     BUILD_MODE="Release"
     if [ ${ABS_BUILD_MODE} = "Debug" ]; then
@@ -276,6 +287,7 @@ set_global_env
 count=0
 
 install_security_profile
+install_rootstraps
 
 trigger_type_build "MODIFY" "${BUILD_PKG_LIST_MODIFY}"
 trigger_type_build "ADD" "${BUILD_PKG_LIST_ADD}"