config/scripts/flash_all
2015-11-25 11:32:55 +01:00

18 lines
311 B
Bash
Executable File

#!/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