extract_utils: Added Suffix uses COMMON_SUFFIX
* COMMON_JAVA_PACKAGE_SUFFIX for jar
* COMMON_ANDROID_PACKAGE_SUFFIX for apk
Change-Id: I812405dac12ef7183985c66a6e43b0ea5f85989c
Signed-off-by: Mohd Faraz <mohd.faraz.abc@gmail.com>
diff --git a/build/tools/extract_utils.sh b/build/tools/extract_utils.sh
index 5b5a732..98145bb 100644
--- a/build/tools/extract_utils.sh
+++ b/build/tools/extract_utils.sh
@@ -514,6 +514,12 @@
BASENAME=$(basename "$FILE")
DIRNAME=$(dirname "$FILE")
EXTENSION=${BASENAME##*.}
+ EXTENSION="."$EXTENSION
+ if [ "$EXTENSION" = ".jar" ]; then
+ EXTENSION="\$(COMMON_JAVA_PACKAGE_SUFFIX)"
+ elif [ "$EXTENSION" = ".apk" ]; then
+ EXTENSION="\$(COMMON_ANDROID_PACKAGE_SUFFIX)"
+ fi
PKGNAME=${BASENAME%.*}
# Add to final package list
@@ -595,7 +601,7 @@
printf 'LOCAL_DEX_PREOPT := false\n'
fi
if [ ! -z "$EXTENSION" ]; then
- printf 'LOCAL_MODULE_SUFFIX := .%s\n' "$EXTENSION"
+ printf 'LOCAL_MODULE_SUFFIX := %s\n' "$EXTENSION"
fi
if [ "$CLASS" = "SHARED_LIBRARIES" ] || [ "$CLASS" = "EXECUTABLES" ]; then
if [ "$DIRNAME" != "." ]; then