config/scripts/flash_all

18 lines
311 B
Plaintext
Raw Normal View History

#!/bin/bash
if [ $# -eq 0 ];
then
imgList=$(ls *.img)
echo "Flashing all images $imgList"
else
imgList=$@
echo "Flashing $imgList"
fi
if [ -z "$imgList" ];
then
echo "No img to Flash"
exit 1
else
adb reboot bootloader; for img in $imgList; do fastboot flash ${img%.img} $img; done && fastboot reboot
fi