PART_NUM=${line_num}
if [ -f ${out_file} ]; then
- sudo rm -fr ${out_file}
+ rm -fr ${out_file}
fi
for ((update_idx=0;update_idx<PART_NUM;update_idx++))
#
fn_build_update_info()
{
- sudo python3 "${UPDATE_INFO_BUILDER_PATH}" "${HAL_TARG_NAME}" "${ROOTFS_TARG_NAME}" "${TIZEN_TARG_NAME}" ${UPDATE_INFO_PATH}
+ python3 "${UPDATE_INFO_BUILDER_PATH}" "${HAL_TARG_NAME}" "${ROOTFS_TARG_NAME}" "${TIZEN_TARG_NAME}" ${UPDATE_INFO_PATH}
rm -f "${HAL_TARG_NAME}" "${ROOTFS_TARG_NAME}" "${TIZEN_TARG_NAME}"
}
#--- delta recovery partition ---
${MK_PART_DELTA} ${part_name} DELTA_IMAGE:AT_BOOT_FOTA ${part_bin} ${delta_bin}
if [ "$?" = "0" ]; then
- sudo mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
- sudo mv ${RESULT_DIR}/${part_bin}/${delta_bin} ${DELTA_DIR}
+ mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
+ mv ${RESULT_DIR}/${part_bin}/${delta_bin} ${DELTA_DIR}
fi
fi
if [ "${RAMDISK2_FULL_IMG}" = "1" ]; then
#--- full recovery partition ---
${MK_PART_DELTA} ${part_name} FULL_IMAGE:AT_BOOT_FOTA ${part_bin} ${delta_bin}
if [ "$?" = "0" ]; then
- sudo mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
- sudo mv ${RESULT_DIR}/${part_bin}/${part_bin} ${DELTA_DIR}
+ mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
+ mv ${RESULT_DIR}/${part_bin}/${part_bin} ${DELTA_DIR}
fi
fi
elif [ "${part_name}" = "RECOVERY" ]; then
#--- recovery kernel ---
- sudo echo "1" > ${DELTA_DIR}/${delta_bin}
+ echo "1" > ${DELTA_DIR}/${delta_bin}
elif [ "${part_name}" = "EXTRA" ]; then
echo "---"
fi
return 1;
fi
- sudo mount -o loop "${IMAGE}" ${MNT_PNT}
+ mount -o loop "${IMAGE}" ${MNT_PNT}
if [ "$?" != "0" ]; then
return 1;
fi
cp "${ROOTFS_MODEL_CONFIG_PATH}" "${ROOTFS_TARG_NAME}"
cp "${TIZEN_BUILD_CONFIG_PATH}" "${TIZEN_TARG_NAME}"
- sudo umount ${MNT_PNT}
- sudo rm -f "${IMAGE}"
+ umount ${MNT_PNT}
+ rm -f "${IMAGE}"
fn_get_tar_file_names "$IMAGE" "${NEW_TAR_DIR}"
tar xvf "${DATA_DIR}"/${NEW_TAR_DIR}/"${TAR_FILE_FOUND}" "${IMAGE}"
return 1;
fi
- sudo mount -o loop "${IMAGE}" ${MNT_PNT}
+ mount -o loop "${IMAGE}" ${MNT_PNT}
if [ "$?" != "0" ]; then
return 1;
fi
# TODO buildstring?
fi
- sudo umount ${MNT_PNT}
- sudo rm -rf ${MNT_PNT}
- sudo rm -f "${IMAGE}"
+ umount ${MNT_PNT}
+ rm -rf ${MNT_PNT}
+ rm -f "${IMAGE}"
}
${MK_PART_DELTA} ${part_name} ${update_type} ${part_bin} ${delta_bin}
if [ "$?" = "0" ]; then
if [ "${update_type}" = "DELTA_FS" ]; then
- sudo mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
- sudo mv ${RESULT_DIR}/${part_bin} ${DELTA_DIR}
+ mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
+ mv ${RESULT_DIR}/${part_bin} ${DELTA_DIR}
else
- sudo mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
- sudo mv ${RESULT_DIR}/${part_bin}/${delta_bin} ${DELTA_DIR}
+ mv data/${PART_OUT} ${RESULT_DIR}/${part_bin}
+ mv ${RESULT_DIR}/${part_bin}/${delta_bin} ${DELTA_DIR}
fi
if [ "$?" != "0" ]; then
echo "Warning: No differences - remove record for \"${part_name}\" from the final update.cfg"
sed -i "/^${part_name}\b/d" "${UPDATE_CFG_PATH}"
fi
else
- sudo rm -rf ${RESULT_DIR}/${part_bin}
+ rm -rf ${RESULT_DIR}/${part_bin}
echo "Error: Abort Delta Generation"
exit 1
fi
fi
- sudo rm -rf ${RESULT_DIR}/${part_bin}
+ rm -rf ${RESULT_DIR}/${part_bin}
done
if [ ! -s "${UPDATE_CFG_PATH}" ]; then
#move update.cfg to delta directory
if [ -r ${UPDATE_CFG_PATH} ]; then
- sudo cp ${UPDATE_CFG_PATH} ${DELTA_DIR}/update.cfg
- sudo rm ${UPDATE_CFG_PATH}
+ cp ${UPDATE_CFG_PATH} ${DELTA_DIR}/update.cfg
+ rm ${UPDATE_CFG_PATH}
fi
if [ -r ${LOG_PATH} ]; then
- sudo cp ${LOG_PATH} ${RESULT_DIR}/Delta.log
- sudo rm ${LOG_PATH}
+ cp ${LOG_PATH} ${RESULT_DIR}/Delta.log
+ rm ${LOG_PATH}
fi
if [ -r ${BUILD_STRING_PATH} ]; then
- sudo cp ${BUILD_STRING_PATH} ${DELTA_DIR}/${BUILD_STRING_FILE}
- sudo rm ${BUILD_STRING_PATH}
+ cp ${BUILD_STRING_PATH} ${DELTA_DIR}/${BUILD_STRING_FILE}
+ rm ${BUILD_STRING_PATH}
fi
if [ -r ${UPDATE_INFO_PATH} ]; then
- sudo cp ${UPDATE_INFO_PATH} ${DELTA_DIR}/${UPDATE_INFO_FILE}
- sudo rm ${UPDATE_INFO_PATH}
+ cp ${UPDATE_INFO_PATH} ${DELTA_DIR}/${UPDATE_INFO_FILE}
+ rm ${UPDATE_INFO_PATH}
fi
if [ -r ${SETUP_SCRIPT_PATH} ]; then
- sudo cp ${SETUP_SCRIPT_PATH} ${DELTA_DIR}/setup.sh
+ cp ${SETUP_SCRIPT_PATH} ${DELTA_DIR}/setup.sh
fi
#--- archive result directory ---
cd result/$MONDATE
echo "tar result directory"
- sudo tar cf ${MONDATE}_${Make_Delta}.tar $Make_Delta
+ tar cf ${MONDATE}_${Make_Delta}.tar $Make_Delta
cd ../..
echo "Making delta binary is End!! ($Make_Delta)"
done
if [ -r ${UPDATE_CFG_PATH} ]; then
- sudo rm ${UPDATE_CFG_PATH}
+ rm ${UPDATE_CFG_PATH}
fi
cd ${DELTA_DIR}
-sudo cp ${COMMON_BINDIR}/unpack.sh ./
+cp ${COMMON_BINDIR}/unpack.sh ./
if [ ! -r "${EXTRACTED_FILES_DIR}"/${UPGRADE_APPLY_BIN} ]; then
fn_extract_files_from_partition rootfs.img
# Ensure essential files are at beginning of archive (metadata, scripts and binaries to perform upgrade)
touch *.txt *.cfg *.ini *.sh *.inc
sha1sum * > checksum.SHA1
-sudo tar --overwrite -cpf ../delta.tar $(ls -1td *)
+tar --overwrite -cpf ../delta.tar $(ls -1td *)
SIGN_PKCS_FILE=$1
SIGN_PKCS_PASSWORD=$2
if [ "z${SIGN_PKCS_PASSWORD}" != "z" ]; then
SIGNER_OPTIONAL_ARGUMENT="-p ${SIGN_PKCS_PASSWORD}"
fi
- sudo ${COMMON_BINDIR}/sign_img.sh -k ${SIGN_PKCS_FILE} -i ../delta.tar ${SIGNER_OPTIONAL_ARGUMENT}
+ ${COMMON_BINDIR}/sign_img.sh -k ${SIGN_PKCS_FILE} -i ../delta.tar ${SIGNER_OPTIONAL_ARGUMENT}
fi
cd -
fi
local MNT_PNT="MNT_PNT"
mkdir -p ${MNT_PNT}
- sudo mount -o loop,ro "${DELTA_DIR}/${PART_BIN}" ${MNT_PNT}
+ mount -o loop,ro "${DELTA_DIR}/${PART_BIN}" ${MNT_PNT}
fn_extract_needed_files ${MNT_PNT}
- sudo umount ${MNT_PNT}
+ umount ${MNT_PNT}
rm -rf ${MNT_PNT}
}
SHA1_SUM=$(sha1sum ${DIR_WITH_IMAGES}/${PART_BIN} | awk '{print $1}')
echo -e "\t\t${IMG_SIZE}\t[${SHA1_SUM}]"
- sudo mv ${DIR_WITH_IMAGES}/${PART_BIN} ${DELTA_DIR}/${DELTA_BIN}
- sudo chown ${MY_ID}:${MY_ID} ${DELTA_DIR}/${PART_BIN}
+ mv ${DIR_WITH_IMAGES}/${PART_BIN} ${DELTA_DIR}/${DELTA_BIN}
+ chown ${MY_ID}:${MY_ID} ${DELTA_DIR}/${PART_BIN}
fn_extract_mounting_wrapper
fn_build_update_info()
{
- sudo python3 "${UPDATE_INFO_PATH}" ${HAL_EXCTRACTED} ${ROOTFS_EXCTRACTED} ${TIZEN_EXCTRACTED} ${UPDATE_INFO_FILE} --full_type
+ python3 "${UPDATE_INFO_PATH}" ${HAL_EXCTRACTED} ${ROOTFS_EXCTRACTED} ${TIZEN_EXCTRACTED} ${UPDATE_INFO_FILE} --full_type
rm -f ${HAL_EXCTRACTED} ${ROOTFS_EXCTRACTED} ${TIZEN_EXCTRACTED}
}
#move update.cfg to delta directory
if [ -r ${UPDATE_CFG_PATH} ]; then
- sudo cp ${UPDATE_CFG_PATH} ${DELTA_DIR}/update.cfg
- sudo rm ${UPDATE_CFG_PATH}
+ cp ${UPDATE_CFG_PATH} ${DELTA_DIR}/update.cfg
+ rm ${UPDATE_CFG_PATH}
fi
if [ -r ${LOG_PATH} ]; then
- sudo cp ${LOG_PATH} ${RESULT_DIR}/Delta.log
- sudo rm ${LOG_PATH}
+ cp ${LOG_PATH} ${RESULT_DIR}/Delta.log
+ rm ${LOG_PATH}
fi
if [ -r ${BUILD_STRING_PATH} ]; then
- sudo cp ${BUILD_STRING_PATH} ${DELTA_DIR}/${BUILD_STRING_FILE}
- sudo rm ${BUILD_STRING_PATH}
+ cp ${BUILD_STRING_PATH} ${DELTA_DIR}/${BUILD_STRING_FILE}
+ rm ${BUILD_STRING_PATH}
fi
if [ -r ${SETUP_SCRIPT_PATH} ]; then
- sudo cp ${SETUP_SCRIPT_PATH} ${DELTA_DIR}/setup.sh
+ cp ${SETUP_SCRIPT_PATH} ${DELTA_DIR}/setup.sh
fi
if [ -r ${DIR_WITH_IMAGES} ]; then
- sudo rm -r ${DIR_WITH_IMAGES}
+ rm -r ${DIR_WITH_IMAGES}
fi
#--- archive result directory ---
touch *.sh *.inc *.txt *.cfg *.ini
sha1sum * > checksum.SHA1
echo "tar result directory"
- sudo tar cf ../delta.tar *
+ tar cf ../delta.tar *
popd
echo "Making delta binary is End!!"
mkdir -p ${MNT_PNT_OLD}
mkdir -p ${MNT_PNT_NEW}
- sudo mount -o loop,ro "${PART_IMG_OLD}" ${MNT_PNT_OLD}
- sudo mount -o loop,ro "${PART_IMG_NEW}" ${MNT_PNT_NEW}
+ mount -o loop,ro "${PART_IMG_OLD}" ${MNT_PNT_OLD}
+ mount -o loop,ro "${PART_IMG_NEW}" ${MNT_PNT_NEW}
fn_extract_needed_files ${MNT_PNT_OLD} ${MNT_PNT_NEW}
- sudo umount ${MNT_PNT_OLD}
- sudo umount ${MNT_PNT_NEW}
+ umount ${MNT_PNT_OLD}
+ umount ${MNT_PNT_NEW}
rm -rf ${MNT_PNT_OLD}
rm -rf ${MNT_PNT_NEW}
echo "Attribute generation for ${TARGET} [START] $(date +%T)"
- sudo find ./${BASE_DIR_OLD} -type f -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V1_ATTR_FILE}
- sudo find ./${BASE_DIR_OLD} -type l -printf '"%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
- sudo find ./${BASE_DIR_OLD} -type d -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
+ find ./${BASE_DIR_OLD} -type f -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V1_ATTR_FILE}
+ find ./${BASE_DIR_OLD} -type l -printf '"%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
+ find ./${BASE_DIR_OLD} -type d -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V1_ATTR_FILE}
- sudo find ./${BASE_DIR_NEW} -type f -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V2_ATTR_FILE}
- sudo find ./${BASE_DIR_NEW} -type l -printf '"%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
- sudo find ./${BASE_DIR_NEW} -type d -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
+ find ./${BASE_DIR_NEW} -type f -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; > ${V2_ATTR_FILE}
+ find ./${BASE_DIR_NEW} -type l -printf '"%P" SymLink 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
+ find ./${BASE_DIR_NEW} -type d -printf '"%P" Regular 14 %04m:%04U:%04G:' -exec ${COMMON_BINDIR}/${ATTR_CMD} {} \; >> ${V2_ATTR_FILE}
################ Change user and group permission from '0' to '0000' ############
sed -i 's/: 0/:0000/g' ${V1_ATTR_FILE}
if [ "$?" != "0" ]; then
return 1;
fi
- sudo mv ${PART_IMG_ORG} ${PART_IMG_OLD}
+ mv ${PART_IMG_ORG} ${PART_IMG_OLD}
fi
echo "untar ${NEW_TAR_FILE}"
if [ "$?" != "0" ]; then
return 1;
fi
- sudo mv ${PART_IMG_ORG} ${PART_IMG_NEW}
+ mv ${PART_IMG_ORG} ${PART_IMG_NEW}
# after extraction, get neccessary files
fn_extract_mounting_wrapper
if [ ! "z${OLD_TAR_FILE}" = "z" ]; then
#---- check whether the binaries are same ----
- sudo diff ${PART_IMG_OLD} ${PART_IMG_NEW}
+ diff ${PART_IMG_OLD} ${PART_IMG_NEW}
if [ "$?" = "0" ]; then
echo "[${PART_NAME}] two binaries are same"
- sudo rm -rf ${PART_IMG_OLD}
- sudo rm -rf ${PART_IMG_NEW}
+ rm -rf ${PART_IMG_OLD}
+ rm -rf ${PART_IMG_NEW}
return 0
fi
- sudo python3 ${COMMON_BINDIR}/CreatePatch.py ${UPDATE_TYPE} ${PART_NAME} ${PART_IMG_OLD} ${PART_IMG_NEW} ${OUTPUT_DIR} ${UPDATE_CFG_PATH}
+ python3 ${COMMON_BINDIR}/CreatePatch.py ${UPDATE_TYPE} ${PART_NAME} ${PART_IMG_OLD} ${PART_IMG_NEW} ${OUTPUT_DIR} ${UPDATE_CFG_PATH}
PythonRet=$?
- sudo rm ${PART_IMG_OLD}
+ rm ${PART_IMG_OLD}
if [ $PythonRet != "0" ]; then
echo "[${PART_NAME}] Failed to generate DELTA"
fi
fi
- sudo mv ${PART_IMG_NEW} ${OUTPUT_DIR}/${PART_IMG_ORG}
- sudo chown ${MY_ID}:${MY_ID} ${OUTPUT_DIR}/${PART_IMG_ORG}
+ mv ${PART_IMG_NEW} ${OUTPUT_DIR}/${PART_IMG_ORG}
+ chown ${MY_ID}:${MY_ID} ${OUTPUT_DIR}/${PART_IMG_ORG}
return 0
}
if [ "$?" != "0" ]; then
return 1;
fi
- sudo mv ${PART_IMG_ORG} ${PART_IMG_OLD}
+ mv ${PART_IMG_ORG} ${PART_IMG_OLD}
echo "untar ${NEW_TAR_FILE}"
tar xvf ${NEW_TAR_DIR}/${NEW_TAR_FILE} ${PART_IMG_ORG}
if [ "$?" != "0" ]; then
return 1;
fi
- sudo mv ${PART_IMG_ORG} ${PART_IMG_NEW}
+ mv ${PART_IMG_ORG} ${PART_IMG_NEW}
# after extraction, get neccessary files
fn_extract_mounting_wrapper
#---- check whether the binaries are same ----
- sudo diff ${PART_IMG_OLD} ${PART_IMG_NEW}
+ diff ${PART_IMG_OLD} ${PART_IMG_NEW}
if [ "$?" = "0" ]; then
echo "[${PART_NAME}] two binaries are same"
- sudo rm -rf ${PART_IMG_OLD}
- sudo rm -rf ${PART_IMG_NEW}
+ rm -rf ${PART_IMG_OLD}
+ rm -rf ${PART_IMG_NEW}
return 0
fi
#---- make delta file ----
echo "make ${DELTA}"
- sudo python3 ${COMMON_BINDIR}/CreatePatch.py ${UPDATE_TYPE} ${PART_NAME} ${PART_IMG_OLD} ${PART_IMG_NEW} ${OUTPUT_DIR} ${UPDATE_CFG_PATH}
+ python3 ${COMMON_BINDIR}/CreatePatch.py ${UPDATE_TYPE} ${PART_NAME} ${PART_IMG_OLD} ${PART_IMG_NEW} ${OUTPUT_DIR} ${UPDATE_CFG_PATH}
PythonRet=$?
- #sudo xdelta delta ${PART_IMG_OLD} ${PART_IMG_NEW} ./${OUTPUT_DIR}/${PART_NAME}".delta"
+ #xdelta delta ${PART_IMG_OLD} ${PART_IMG_NEW} ./${OUTPUT_DIR}/${PART_NAME}".delta"
#---- remove files & directories ----
echo "remove temp files/directory & move delta/log to result directory"
- sudo rm -rf ${PART_IMG_OLD}
- sudo rm -rf ${PART_IMG_NEW}
- sudo rm -rf x
+ rm -rf ${PART_IMG_OLD}
+ rm -rf ${PART_IMG_NEW}
+ rm -rf x
if [ $PythonRet != "0" ]; then
echo "[${PART_NAME}] Failed to generate DELTA"
if [ "$?" != "0" ]; then
return 1;
fi
- sudo mv ${PART_IMG_ORG} ${PART_IMG_OLD}
+ mv ${PART_IMG_ORG} ${PART_IMG_OLD}
echo "untar ${NEW_TAR_FILE}"
tar xvf ${NEW_TAR_DIR}/${NEW_TAR_FILE} ${PART_IMG_ORG}
if [ "$?" != "0" ]; then
return 1;
fi
- sudo mv ${PART_IMG_ORG} ${PART_IMG_NEW}
+ mv ${PART_IMG_ORG} ${PART_IMG_NEW}
#---- check whether the binaries are same ----
- sudo diff ${PART_IMG_OLD} ${PART_IMG_NEW}
+ diff ${PART_IMG_OLD} ${PART_IMG_NEW}
if [ "$?" = "0" ]; then
echo "[${PART_NAME}] two binaries are same"
- sudo rm -rf ${PART_IMG_OLD}
- sudo rm -rf ${PART_IMG_NEW}
- sudo rm -rf ${OUTPUT_DIR}
+ rm -rf ${PART_IMG_OLD}
+ rm -rf ${PART_IMG_NEW}
+ rm -rf ${OUTPUT_DIR}
return 0
fi
#---- mount partition image to mount point ----
echo "mount ${PART_IMG_OLD} & ${PART_IMG_NEW}"
- sudo mount -o loop ${PART_IMG_OLD} ${MNT_PNT_OLD}
+ mount -o loop ${PART_IMG_OLD} ${MNT_PNT_OLD}
if [ "$?" != "0" ]; then
return 1;
fi
- sudo mount -o loop ${PART_IMG_NEW} ${MNT_PNT_NEW}
+ mount -o loop ${PART_IMG_NEW} ${MNT_PNT_NEW}
if [ "$?" != "0" ]; then
return 1;
fi
#---- remove unnecessary files & directories ----
for ff in ${EXCLUDE_FILES}
do
- sudo rm -rf ${MNT_PNT_OLD}/${ff}
- sudo rm -rf ${MNT_PNT_NEW}/${ff}
+ rm -rf ${MNT_PNT_OLD}/${ff}
+ rm -rf ${MNT_PNT_NEW}/${ff}
done
#---- make attribute ----
fn_mk_attribute ${PART_NAME} ${BASE_OLD} ${BASE_NEW}
#PART_IMG_ORG parameter should match with DELTA name that is part of default config file. Which will be used to update MAX size file that is present in respective partition.
- sudo python3 ${COMMON_BINDIR}/CreatePatch.py ${UPDATE_TYPE} ${PART_NAME} ${BASE_OLD} ${BASE_NEW} ${OUTPUT_DIR} ${UPDATE_CFG_PATH} \
+ python3 ${COMMON_BINDIR}/CreatePatch.py ${UPDATE_TYPE} ${PART_NAME} ${BASE_OLD} ${BASE_NEW} ${OUTPUT_DIR} ${UPDATE_CFG_PATH} \
--attr_old ${V1_ATTR_FILE} --attr_new ${V2_ATTR_FILE}
PythonRet=$?
#---- unmount partition image ----
echo "umount ${MNT_PNT_OLD} & ${MNT_PNT_NEW}"
- sudo umount ${MNT_PNT_OLD}
- sudo umount ${MNT_PNT_NEW}
+ umount ${MNT_PNT_OLD}
+ umount ${MNT_PNT_NEW}
#---- remove files & directories ----
echo "remove temp files/directory & move delta/log to result directory"
- sudo rm -rf ${PART_IMG_OLD}
- sudo rm -rf ${PART_IMG_NEW}
- sudo rm -rf ${BASE_OLD} ${BASE_NEW}
- sudo rm -rf x
+ rm -rf ${PART_IMG_OLD}
+ rm -rf ${PART_IMG_NEW}
+ rm -rf ${BASE_OLD} ${BASE_NEW}
+ rm -rf x
#---- extra cleanup ----
- sudo mv ./file_attr_updated_image.txt ${OUTPUT_DIR}/${PART_NAME}_file_attr_updated_image.txt
+ mv ./file_attr_updated_image.txt ${OUTPUT_DIR}/${PART_NAME}_file_attr_updated_image.txt
if [ $PythonRet != "0" ]; then
echo "[${PART_NAME}] Failed to generate DELTA"
return 1;
fi
- sudo mv ${PART_IMG_NEW} ${OUTPUT_DIR}/${PART_BIN}
- sudo chown ${MY_ID}:${MY_ID} ${OUTPUT_DIR}/${PART_BIN}
+ mv ${PART_IMG_NEW} ${OUTPUT_DIR}/${PART_BIN}
+ chown ${MY_ID}:${MY_ID} ${OUTPUT_DIR}/${PART_BIN}
return 0
}
OUTPUT_DIR=${PART_NAME}_OUT
if [ ! -d ${OUTPUT_DIR} ]; then
if [ -f ${OUTPUT_DIR} ]; then
- sudo rm -f ${OUTPUT_DIR}
+ rm -f ${OUTPUT_DIR}
fi
mkdir ${OUTPUT_DIR}
fi