extract_utils: Split optional args with semicolon instead of colon

* Fix optional flags like PRESIGNED
  after I1f5a1abd6929e4a7e0ccd6370d3a3dd986f94fed

Change-Id: I889f995d7f19b09908cfbaf7474442ce48bfabdb
gugelfrei
Michael Bestas 7 years ago
parent c982836ca6
commit 3f9b94cb67

@ -123,13 +123,13 @@ function target_file() {
# #
# target_args: # target_args:
# #
# $1: colon delimited list # $1: semicolon delimited list
# #
# Returns optional arguments (last value) for given target # Returns optional arguments (last value) for given target
# #
function target_args() { function target_args() {
local LINE="$1" local LINE="$1"
local SPLIT=(${LINE//:/ }) local SPLIT=(${LINE//;/ })
local COUNT=${#SPLIT[@]} local COUNT=${#SPLIT[@]}
if [ "$COUNT" -gt "1" ]; then if [ "$COUNT" -gt "1" ]; then
if [[ ! "${SPLIT[$COUNT-1]}" =~ .*/.* ]]; then if [[ ! "${SPLIT[$COUNT-1]}" =~ .*/.* ]]; then
@ -266,7 +266,7 @@ function write_packages() {
local SRC= local SRC=
for P in "${FILELIST[@]}"; do for P in "${FILELIST[@]}"; do
FILE=$(target_file "$P") FILE=$(echo $(target_file "$P") | sed 's/\;.*//')
ARGS=$(target_args "$P") ARGS=$(target_args "$P")
BASENAME=$(basename "$FILE") BASENAME=$(basename "$FILE")
@ -305,12 +305,10 @@ function write_packages() {
printf 'LOCAL_MULTILIB := %s\n' "$EXTRA" printf 'LOCAL_MULTILIB := %s\n' "$EXTRA"
fi fi
elif [ "$CLASS" = "APPS" ]; then elif [ "$CLASS" = "APPS" ]; then
if [ -z "$ARGS" ]; then if [ "$EXTRA" = "priv-app" ]; then
if [ "$EXTRA" = "priv-app" ]; then SRC="$SRC/priv-app"
SRC="$SRC/priv-app" else
else SRC="$SRC/app"
SRC="$SRC/app"
fi
fi fi
printf 'LOCAL_SRC_FILES := %s/%s\n' "$SRC" "$FILE" printf 'LOCAL_SRC_FILES := %s/%s\n' "$SRC" "$FILE"
local CERT=platform local CERT=platform
@ -939,7 +937,7 @@ function extract() {
local FROM=$(target_file "${FILELIST[$i-1]}") local FROM=$(target_file "${FILELIST[$i-1]}")
local ARGS=$(target_args "${FILELIST[$i-1]}") local ARGS=$(target_args "${FILELIST[$i-1]}")
local SPLIT=(${FILELIST[$i-1]//:/ }) local SPLIT=(${FILELIST[$i-1]//:/ })
local FILE="${SPLIT[0]#-}" local FILE=$(echo "${SPLIT[0]#-}" | sed 's/\;.*//')
local OUTPUT_DIR="$OUTPUT_ROOT" local OUTPUT_DIR="$OUTPUT_ROOT"
local TMP_DIR="$OUTPUT_TMP" local TMP_DIR="$OUTPUT_TMP"
local TARGET= local TARGET=

Loading…
Cancel
Save