RES_DIR=$3
ROOTDIR=`basename $PWD`
ADDITIONAL_RES_DIR=$PWD/code/sdk/output/additional_fs
-
+OTA_ALL_FLAG_PATH=$PWD/code/sdk/output/ota_all
if [ ! -d "$SOURCE_DIR" ] ; then
echo "$SOURCE_DIR not exist , skip create ota package"
echo ""
exit 0
fi
+if [ "$3" == "ota_all" ]; then
+touch $OTA_ALL_FLAG_PATH
+else
+rm $OTA_ALL_FLAG_PATH -f
+fi
+
+
mkdir code/sdk/output/brandy/TestOTA/ -p
rm -rf code/sdk/output/brandy/TestOTA/*
cd -
mkdir release/ota -p
-cp code/sdk/output/brandy/TestOTA/upgrade/update.fwpkg release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg
-echo create ota file release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg done
+target_fwpkg_filepath=release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg
+cp code/sdk/output/brandy/TestOTA/upgrade/update.fwpkg $target_fwpkg_filepath
+fwpkg_filesize=`ls $target_fwpkg_filepath -lh|awk '{print $5}'`
+
+echo create ota file $target_fwpkg_filepath $fwpkg_filesize done
else
echo ""
-echo "usage: $0 source_release target_release "
+echo "usage: $0 source_release target_release [ota_all]"
echo ""
fi