[boot0]:remove no need files before extract image (#460)
* [Aboot]:remove no need files before extract image Signed-off-by: Sihui Han <sihan@microsoft.com> * use and remove boot0 in the check Signed-off-by: Sihui Han <sihan@microsoft.com> * change the comments accordingly Signed-off-by: Sihui Han <sihan@microsoft.com>
This commit is contained in:
parent
9841f8338b
commit
5c8bcef1ac
@ -41,11 +41,13 @@ parse_environment_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extract_image() {
|
extract_image() {
|
||||||
## Clean old directory for read-write layer
|
## Remove all the other unnecssary files except swi file, boot-config
|
||||||
rm -rf "$target_path/rw"
|
for f in $(ls -A $target_path); do
|
||||||
|
if [ $f != "${swipath##*/}" ] && [ $f != "boot-config" ]; then
|
||||||
## Clean docker directory
|
rm -rf "$target_path/$f"
|
||||||
rm -rf "$target_path/{{ DOCKERFS_DIR }}"
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
## Unzip the image
|
## Unzip the image
|
||||||
unzip -oq "$swipath" -x boot0 -d "$target_path"
|
unzip -oq "$swipath" -x boot0 -d "$target_path"
|
||||||
|
Reference in New Issue
Block a user