Created
March 6, 2018 22:15
-
-
Save dkhmelenko/d74dbc6c9907c7a581bde0e1bee5c74b to your computer and use it in GitHub Desktop.
Script for analyzing Android APK size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH_TO_APK=$1 | |
APK_THRESHOLD=$2 | |
echo "Analyze APK size command" | |
NEW_APK_SIZE=`expr $(stat -c%s PATH_TO_APK) / 1024` | |
echo "APK size is now "$NEW_APK_SIZE" KB" | |
if [[ $NEW_APK_SIZE -lt $APK_THRESHOLD ]]; then | |
echo "APK file is less than "$APK_THRESHOLD" KB. OK" | |
else | |
echo "APK file is above the threshold of "$APK_THRESHOLD" KB. Failed" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment