envsetup: Fix indentation of eat function

Change-Id: I14afa4c8f7c705cfa04ad07f56f7e7a13a8c9378
This commit is contained in:
Ethan Chen
2016-12-31 13:23:56 -08:00
parent 046484f8c7
commit b69c2ff494

View File

@@ -96,30 +96,29 @@ function eat()
done
echo "Device Found.."
fi
if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD");
then
# if adbd isn't root we can't write to /cache/recovery/
adb root
sleep 1
adb wait-for-device
cat << EOF > /tmp/command
if (adb shell getprop ro.cm.device | grep -q "$CM_BUILD"); then
# if adbd isn't root we can't write to /cache/recovery/
adb root
sleep 1
adb wait-for-device
cat << EOF > /tmp/command
--sideload_auto_reboot
EOF
if adb push /tmp/command /cache/recovery/ ; then
echo "Rebooting into recovery for sideload installation"
adb reboot recovery
adb wait-for-sideload
adb sideload $ZIPPATH
if adb push /tmp/command /cache/recovery/ ; then
echo "Rebooting into recovery for sideload installation"
adb reboot recovery
adb wait-for-sideload
adb sideload $ZIPPATH
fi
rm /tmp/command
else
echo "The connected device does not appear to be $CM_BUILD, run away!"
fi
rm /tmp/command
return $?
else
echo "Nothing to eat"
return 1
fi
return $?
else
echo "The connected device does not appear to be $CM_BUILD, run away!"
fi
}
function omnom()