Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

d2: move extractfiles to common

Change-Id: Ia7ae12913f5a37ad470dd0a9064d418af0eedb05
  • Loading branch information...
commit 153badd00f3017446f447d945f1ca4910dddf178 1 parent 6035925
@noobnl noobnl authored
Showing with 3 additions and 140 deletions.
  1. +3 −46 extract-files.sh
  2. +0 −94 setup-makefiles.sh
View
49 extract-files.sh 100644 → 100755
@@ -2,49 +2,6 @@
set -e
-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/samsung/d2usc/proprietary
-rm -rf $BASE/*
-
-for FILE in `egrep -v '(^#|^$)' device-proprietary-files.txt`; do
- echo "Extracting /system/$FILE ..."
- DIR=`dirname $FILE`
- if [ ! -d $BASE/$DIR ]; then
- mkdir -p $BASE/$DIR
- fi
- if [ "$SRC" = "adb" ]; then
- adb pull /system/$FILE $BASE/$FILE
- else
- cp $SRC/system/$FILE $BASE/$FILE
- fi
-done
-
-for FILE in `egrep -v '(^#|^$)' ../d2-common/common-proprietary-files.txt`; do
- echo "Extracting /system/$FILE ..."
- DIR=`dirname $FILE`
- if [ ! -d $BASE/$DIR ]; then
- mkdir -p $BASE/$DIR
- fi
- if [ "$SRC" = "adb" ]; then
- adb pull /system/$FILE $BASE/$FILE
- else
- cp $SRC/system/$FILE $BASE/$FILE
- fi
-done
-
-./setup-makefiles.sh
+export DEVICE=d2usc
+export VENDOR=samsung
+./../d2-common/extract-files.sh
View
94 setup-makefiles.sh
@@ -1,94 +0,0 @@
-VENDOR=samsung
-DEVICE=d2usc
-OUTDIR=vendor/$VENDOR/$DEVICE
-MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk
-
-(cat << EOF) > $MAKEFILE
-# Copyright (C) 2011 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.
-
-# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
-
-# Prebuilt libraries that are needed to build open-source libraries
-PRODUCT_COPY_FILES += \\
- $OUTDIR/proprietary/lib/libacdbloader.so:obj/lib/libacdbloader.so \\
- $OUTDIR/proprietary/lib/libaudioalsa.so:obj/lib/libaudioalsa.so
-
-PRODUCT_COPY_FILES += \\
-EOF
-
-LINEEND=" \\"
-COUNT=`wc -l device-proprietary-files.txt | awk {'print $1'}`
-DISM=`egrep -c '(^#|^$)' device-proprietary-files.txt`
-COUNT=`expr $COUNT - $DISM`
-for FILE in `egrep -v '(^#|^$)' device-proprietary-files.txt`; do
- COUNT=`expr $COUNT - 1`
- if [ $COUNT = "0" ]; then
- LINEEND=""
- fi
- echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE
-done
-
-LINEEND=" \\"
-COUNT=`wc -l ../d2-common/common-proprietary-files.txt | awk {'print $1'}`
-DISM=`egrep -c '(^#|^$)' ../d2-common/common-proprietary-files.txt`
-COUNT=`expr $COUNT - $DISM`
-for FILE in `egrep -v '(^#|^$)' ../d2-common/common-proprietary-files.txt`; do
- COUNT=`expr $COUNT - 1`
- if [ $COUNT = "0" ]; then
- LINEEND=""
- fi
- echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE
-done
-
-(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk
-# Copyright (C) 2011 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.
-
-# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
-
-# Pick up overlay for features that depend on non-open-source files
-
-\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk)
-EOF
-
-(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk
-# Copyright (C) 2011 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.
-
-# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
-EOF
-
Please sign in to comment.
Something went wrong with that request. Please try again.