diff options
| author | jrior001 <jriordan001@gmail.com> | 2015-08-05 20:33:54 -0400 |
|---|---|---|
| committer | jrior001 <jriordan001@gmail.com> | 2015-08-05 21:02:14 -0400 |
| commit | 40e7459ea65f1ac8d9e47c10579a0b9e790362d8 (patch) | |
| tree | 4e1740bf500687284bdeb1bb00cba8edb333216d /extract-files.sh | |
| parent | d0ff995f8207fb967e8f8558f5cf6483dabcd224 (diff) | |
Z008: move all the common things to mofd-common
* Leave basic makefiles
* Leave power profile
* Leave kernel-headers
* Leave device specific blobs here
Change-Id: Idbd490fc465a1ba639bf0cc3ae963b85d43a94e3
Diffstat (limited to 'extract-files.sh')
| -rwxr-xr-x | extract-files.sh | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/extract-files.sh b/extract-files.sh index ecca265..ce5e79f 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,54 +1,7 @@ #!/bin/bash #set -e + export DEVICE=Z008 export VENDOR=asus - -if [ $# -eq 0 ]; then - SRC=adb -else - if [ $# -eq 1 ]; then - SRC=$1 - else - echo "$0: bad number of arguments" - echo "" - echo "usage: $0 [PATH_TO_EXPANDED_ROM]" - echo "" - echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" - echo "the device using adb pull." - exit 1 - fi -fi - -BASE=../../../vendor/$VENDOR/$DEVICE/proprietary -rm -rf $BASE/* - -for FILE in `egrep -v '(^#|^$)' proprietary-files.txt`; 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 [ -r $SRC/system/$DEST ]; then - cp $SRC/system/$DEST $BASE/$DEST - else - cp $SRC/system/$FILE $BASE/$DEST - fi - fi -done - -./setup-makefiles.sh +./../mofd-common/extract-files.sh $@
\ No newline at end of file |
