From feafa1c9b37ca31ff0134ecd66d00a1732922fc8 Mon Sep 17 00:00:00 2001 From: Paul Keith Date: Fri, 7 Apr 2017 08:13:31 -0500 Subject: [PATCH] Specify a target for setup-makefiles.sh * So it can be run standalone Signed-off-by: Paul Keith --- extract-files.sh | 2 +- setup-makefiles.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/extract-files.sh b/extract-files.sh index fb8dc13..9098f31 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -65,4 +65,4 @@ setup_vendor "$TARGET" "$VENDOR" "$CM_ROOT" extract "$MY_DIR"/proprietary-files-$TARGET.txt "$SRC" -"$MY_DIR"/setup-makefiles.sh +"$MY_DIR"/setup-makefiles.sh -t $TARGET diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 551d657..c02587a 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -18,6 +18,9 @@ set -e +export GAPPS_COMMON=common +export VENDOR=gapps + # Load extract_utils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi @@ -31,6 +34,19 @@ if [ ! -f "$HELPER" ]; then fi . "$HELPER" +while [ "$1" != "" ]; do + case $1 in + -t | --target ) shift + export TARGET=$1 + esac + shift +done + +if [ -z "$TARGET" ]; then + echo "Warning, target for extraction not specified, defaulting to arm" + TARGET=arm +fi + # Initialize the helper for common gapps setup_vendor "$GAPPS_COMMON" "$VENDOR" "$CM_ROOT" true