Skip to content

Commit

Permalink
Update blob list and extract scripts
Browse files Browse the repository at this point in the history
Use the common cm extract script
  • Loading branch information
deadman96385 committed Oct 23, 2016
1 parent 18cef1e commit b1e4db1
Show file tree
Hide file tree
Showing 5 changed files with 703 additions and 1,052 deletions.
75 changes: 37 additions & 38 deletions extract-files.sh
@@ -1,9 +1,38 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

set -e

export DEVICE=x2
export VENDOR=leeco

# Load extractutils and do some sanity checks
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"

if [ $# -eq 0 ]; then
SRC=adb
else
Expand All @@ -20,41 +49,11 @@ else
fi
fi

function extract() {
for FILE in `egrep -v '(^#|^$)' $1`; do
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"`
DEST=${PARSING_ARRAY[1]}
if [ -z $DEST ]
then
DEST=$FILE
fi
DIR=`dirname $DEST`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
# Try CM target first
if [ "$SRC" = "adb" ]; then
adb pull /system/$DEST $BASE/$DEST
# if file does not exist try OEM target
if [ "$?" != "0" ]; then
adb pull /system/$FILE $BASE/$DEST
fi
else
if [ -z $SRC/system/$DEST ]; then
echo ":: $DEST"
cp $SRC/system/$DEST $BASE/$DEST
else
echo ":: $FILE"
cp $SRC/system/$FILE $BASE/$DEST
fi
fi
done
}

BASE=../../../vendor/$VENDOR/$DEVICE/proprietary
rm -rf $BASE/*

extract ../../$VENDOR/$DEVICE/proprietary-files.txt $BASE

./setup-makefiles.sh
# Initialize the helper
setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"

extract "$MY_DIR"/proprietary-files-qc.txt "$SRC"
extract "$MY_DIR"/proprietary-files-qc-perf.txt "$SRC"
extract "$MY_DIR"/proprietary-files.txt "$SRC"

"$MY_DIR"/setup-makefiles.sh
17 changes: 17 additions & 0 deletions proprietary-files-qc-perf.txt
@@ -0,0 +1,17 @@
# Perf
bin/iop
lib64/libqti-iop.so
vendor/bin/perfd
vendor/etc/perf-profile0.conf
vendor/etc/perf-profile1.conf
vendor/etc/perf-profile2.conf
vendor/etc/perf-profile3.conf
vendor/etc/perf-profile4.conf
vendor/etc/perf-profile5.conf
vendor/etc/perf-profile6.conf
vendor/lib/libqc-opt.so
vendor/lib/libqti-iop-client.so
vendor/lib/libqti-perfd-client.so
vendor/lib64/libqc-opt.so
vendor/lib64/libqti-iop-client.so
vendor/lib64/libqti-perfd-client.so

0 comments on commit b1e4db1

Please sign in to comment.