Skip to content

Commit

Permalink
fascinatemtd: allow extract script to pull files from a zip
Browse files Browse the repository at this point in the history
Change-Id: Ib577817ee846ed2280a39f4520e14cccc50f0b1f
  • Loading branch information
jt1134 committed Feb 22, 2013
1 parent 9d5558c commit c90a635
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp
18 changes: 17 additions & 1 deletion extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,29 @@ DEVICE=fascinatemtd

BASE=../../../vendor/$VENDOR/$DEVICE/proprietary
rm -rf $BASE/*
CMD="adb pull "

if [ -e "$1" ]; then
rm -rf tmp
mkdir tmp
if ! unzip -q "$1" -d tmp; then
echo Failed to unzip "$1"
exit 1
fi
CMD="cp tmp"
fi

for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
adb pull /system/$FILE $BASE/$FILE
if ! $CMD/system/$FILE $BASE/$FILE; then
echo Failed to pull or copy $FILE
exit 1
fi
done

rm -rf tmp

./setup-makefiles.sh

0 comments on commit c90a635

Please sign in to comment.