gapps: Misc script fixes

* Point to vendor/lineage
* Add initial copyright year
* Remove arg for target, it's unneeded
* Remove arg for path, it's unneeded
* Cleanup sed'ding of makefiles
This commit is contained in:
Paul Keith
2018-02-10 23:16:58 +01:00
parent 303f640fa3
commit ef10b54e5d
2 changed files with 18 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017 The LineageOS Project
# Copyright (C) 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -25,44 +25,25 @@ export VENDOR=gapps
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
CM_ROOT="$MY_DIR"/../..
LINEAGE_ROOT="$MY_DIR"/../..
HELPER="$CM_ROOT"/vendor/cm/build/tools/extract_utils.sh
HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
if [ ! -f "$HELPER" ]; then
echo "Unable to find helper script at $HELPER"
exit 1
fi
. "$HELPER"
while [ "$1" != "" ]; do
case $1 in
-p | --path ) shift
SRC=$1
;;
-t | --target ) shift
export TARGET=$1
esac
shift
done
SRC=$1
if [ -z "$SRC" ]; then
echo "Path to system dump not specified! Specify one with --path"
exit 1
fi
if [ -z "$TARGET" ]; then
echo "Architecture for extraction not specified! Specify one with --target"
exit 1
fi
# Initialize the helper for common gapps
setup_vendor "$GAPPS_COMMON" "$VENDOR" "$CM_ROOT"
setup_vendor "$GAPPS_COMMON" "$VENDOR" "$LINEAGE_ROOT"
extract "$MY_DIR"/proprietary-files-common.txt "$SRC"
# Reinitialize the helper for target gapps
setup_vendor "$TARGET" "$VENDOR" "$CM_ROOT"
extract "$MY_DIR"/proprietary-files-$TARGET.txt "$SRC"
"$MY_DIR"/setup-makefiles.sh -t $TARGET
"$MY_DIR"/setup-makefiles.sh