Skip to content

Commit

Permalink
format bin/create_avd script
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Jan 17, 2025
1 parent cdc3a85 commit 11fa7df
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions bin/create_avd
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ DEVICE="${1:-}"
API_LEVEL="${2:-}"

if [ -z "$DEVICE" ]; then
echo "Error: Device is required"
echo "Usage: create_avd <device> <api_level>"
exit 1
echo "Error: Device is required"
echo "Usage: create_avd <device> <api_level>"
exit 1
fi

if [ -z "$API_LEVEL" ]; then
echo "Error: API level is required"
echo "Usage: create_avd <device> <api_level>"
exit 1
echo "Error: API level is required"
echo "Usage: create_avd <device> <api_level>"
exit 1
fi

# | Google Pixel Phone | Release Date | Android Version at Release | SDK Version |
Expand All @@ -28,7 +28,6 @@ fi
# | Pixel 7 | October 2022 | Android 13 | 33 |
# | Pixel 8 | October 2023 | Android 14 | 34 |


uppercase_device=$(echo "$DEVICE" | awk '{for(i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2)}1')
avd_name="${uppercase_device}_API_$API_LEVEL"

Expand Down

0 comments on commit 11fa7df

Please sign in to comment.