Fix so that we get the correct id when more than 9 targets

This commit is contained in:
Dave Johnson 2011-09-07 16:31:29 -07:00
parent d34c0b086e
commit aa577416de

View File

@ -10,7 +10,7 @@ set -e
PROJECT_PATH=${1:-"./example"}
PACKAGE=${2:-"com.phonegap.example"}
ACTIVITY=${3:-"PhoneGapExample"}
TARGET=$(android list targets | grep 'id: ' | sed 's/id: \([0-9]\).*/\1/g' | tail -1)
TARGET=$(android list targets | grep 'id: ' | sed 's/id: \([0-9]*\).*/\1/g' | tail -1)
VERSION=$(cat ./VERSION)
# clobber any existing example