18 lines
311 B
Bash
Executable File
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
|