1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #!/bin/bash
- set -e
- export GAPPS_COMMON=common
- export VENDOR=gapps
- MY_DIR="${BASH_SOURCE%/*}"
- if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
- CM_ROOT="$MY_DIR"/../..
- HELPER="$CM_ROOT"/vendor/cm/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
- if [ -z "$SRC" ]; then
- echo "Warning, path to system dump not specified, pulling from adb"
- SRC=adb
- fi
- if [ -z "$TARGET" ]; then
- echo "Warning, target for extraction not specified, defaulting to arm"
- TARGET=arm
- fi
- setup_vendor "$GAPPS_COMMON" "$VENDOR" "$CM_ROOT"
- extract "$MY_DIR"/proprietary-files-common.txt "$SRC"
- setup_vendor "$TARGET" "$VENDOR" "$CM_ROOT"
- extract "$MY_DIR"/proprietary-files-$TARGET.txt "$SRC"
- "$MY_DIR"/setup-makefiles.sh
|