Skip to content

prepare-fake-ota: prevent downloading again if files already exist

When developing locally and rebuilding a few times the scripts are redownloading already existing files.

Skip downloading if downloaded files are already existing.

Also add additional log output to raise awareness, that existing files are reused.
To redownload, the build directory needs to be deleted.

$> ./build/prepare-fake-ota.sh out/device_$DEVICE.tar.xz ota
File (ota/image-signing.tar.xz) already exists, skipping download.
File (ota/image-master.tar.xz) already exists, skipping download.
File (ota/ubuntu-touch-android9plus-rootfs-arm64.tar.gz) already exists, skipping download.
Extracting rootfs...
./build/prepare-fake-ota.sh: line 70: system/etc/init/ssh.override: Permission denied
./build/prepare-fake-ota.sh: line 71: system/etc/init/ssh.override: Permission denied
./build/prepare-fake-ota.sh: line 73: system/etc/init/usb-tethering.conf: Permission denied
./build/prepare-fake-ota.sh: line 74: system/etc/init/usb-tethering.conf: Permission denied
Repacking rootfs...
/android/halium/device/axolotl-focal
File (ota/halium_halium_arm64.tar.xz) already exists, skipping download.
system/
system/etc/
system/etc/system-image/
system/etc/system-image/channel.ini
system/etc/system-image/config.d/
system/etc/system-image/config.d/00_default.ini
system/etc/system-image/config.d/01_channel.ini
/android/halium/device/axolotl-focal
Edited by Alexander Martinz

Merge request reports