From 2127c71708912399cc1cfa18127970fc59ec2807 Mon Sep 17 00:00:00 2001 From: Kichan Kwon Date: Wed, 16 Sep 2020 19:29:17 +0900 Subject: [PATCH] Include pre script to recovery image if exists Change-Id: I08ab160746db0272d44557eae9eb17abb106d49a Signed-off-by: Kichan Kwon --- recovery/scripts/generate_package.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/recovery/scripts/generate_package.sh b/recovery/scripts/generate_package.sh index 39a382d..3c89a78 100755 --- a/recovery/scripts/generate_package.sh +++ b/recovery/scripts/generate_package.sh @@ -16,8 +16,10 @@ function __setup__() { CONFIG_NAME="recovery.cfg" IMAGE_NAME="tizen-recovery.img" + PRE_SCRIPT_NAME="pre.sh" CONFIG_PATH="$CONFIG_DIR/$CONFIG_NAME" + PRE_SCRIPT_PATH="$CONFIG_DIR/$PRE_SCRIPT_NAME" # Setup prerequiste rm -rf $TEMP_DIR $RESULT_DIR @@ -62,6 +64,11 @@ function __pack__() { echo "[INFO] Binary list : $BINARY_LIST" cp $CONFIG_PATH $TEMP_DIR + if [ -f $PRE_SCRIPT_PATH ]; then + cp $PRE_SCRIPT_PATH $TEMP_DIR + BINARY_LIST="$BINARY_LIST $PRE_SCRIPT_NAME" + fi + cd $TEMP_DIR mksquashfs $BINARY_LIST $IMAGE_NAME chmod 777 $IMAGE_NAME -- 2.7.4