fix ext sdcard and otg
[GitHub/mt8127/android_device_alcatel_ttab.git] / setup-makefiles.sh
CommitLineData
f3fa1980
S
1#!/bin/bash
2
3VENDOR=alcatel
4DEVICE=ttab
5OUTDIR=vendor/$VENDOR/$DEVICE
6MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk
7
8(cat << EOF) > $MAKEFILE
9# Copyright (C) 2013-2016, The CyanogenMod Project
10# Copyright (C) 2017, The LineageOS Project
11#
12# Licensed under the Apache License, Version 2.0 (the "License");
13# you may not use this file except in compliance with the License.
14# You may obtain a copy of the License at
15#
16# http://www.apache.org/licenses/LICENSE-2.0
17#
18# Unless required by applicable law or agreed to in writing, software
19# distributed under the License is distributed on an "AS IS" BASIS,
20# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21# See the License for the specific language governing permissions and
22# limitations under the License.
23
24# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
25
26LOCAL_PATH := vendor/$VENDOR/$DEVICE
27
28PRODUCT_COPY_FILES += \\
29EOF
30
31LINEEND=" \\"
32COUNT=`wc -l proprietary-files.txt | awk {'print $1'}`
33DISM=`egrep -c '(^#|^$)' proprietary-files.txt`
34COUNT=`expr $COUNT - $DISM`
35for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do
36 COUNT=`expr $COUNT - 1`
37 if [ $COUNT = "0" ]; then
38 LINEEND=""
39 fi
40 # Split the file from the destination (format is "file[:destination]")
41 OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS
42 FILE=${PARSING_ARRAY[0]}
43 DEST=${PARSING_ARRAY[1]}
44 if [ -n "$DEST" ]; then
45 FILE=$DEST
46 fi
47 echo " \$(LOCAL_PATH)/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE
48done
49
50(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk
51# Copyright (C) 2013-2016, The CyanogenMod Project
52# Copyright (C) 2017, The LineageOS Project
53#
54# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
56# You may obtain a copy of the License at
57#
58# http://www.apache.org/licenses/LICENSE-2.0
59#
60# Unless required by applicable law or agreed to in writing, software
61# distributed under the License is distributed on an "AS IS" BASIS,
62# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63# See the License for the specific language governing permissions and
64# limitations under the License.
65
66# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
67
68# Pick up overlay for features that depend on non-open-source files
69DEVICE_PACKAGE_OVERLAYS := vendor/$VENDOR/$DEVICE/overlay
70
71\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk)
72EOF
73
74(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk
75# Copyright (C) 2013-2016, The CyanogenMod Project
76# Copyright (C) 2017, The LineageOS Project
77#
78# Licensed under the Apache License, Version 2.0 (the "License");
79# you may not use this file except in compliance with the License.
80# You may obtain a copy of the License at
81#
82# http://www.apache.org/licenses/LICENSE-2.0
83#
84# Unless required by applicable law or agreed to in writing, software
85# distributed under the License is distributed on an "AS IS" BASIS,
86# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
87# See the License for the specific language governing permissions and
88# limitations under the License.
89
90# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh
91
92EOF