blob: 51b4ba2210d4a279a9a0184d4c53da0f30527c51 [file] [log] [blame]
Christopher R. Palmer070fcfc2017-03-03 09:27:58 -05001#!/bin/bash
2#
3# Copyright (C) 2016 The CyanogenMod Project
4# Copyright (C) 2017 The LineageOS Project
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
19set -e
20
21DEVICE=*** FILL IN DEVICE ****
22VENDOR=*** FILL IN VENDOR ****
23
24INITIAL_COPYRIGHT_YEAR=**** FILL IN COPYRIGHT YEAR ****
25
26# Load extract_utils and do some sanity checks
27MY_DIR="${BASH_SOURCE%/*}"
28if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
29
Luca Stefani5c60e4f2017-08-17 19:28:48 +020030LINEAGE_ROOT="$MY_DIR"/../../..
Christopher R. Palmer070fcfc2017-03-03 09:27:58 -050031
Luca Stefani5c60e4f2017-08-17 19:28:48 +020032HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
Christopher R. Palmer070fcfc2017-03-03 09:27:58 -050033if [ ! -f "$HELPER" ]; then
34 echo "Unable to find helper script at $HELPER"
35 exit 1
36fi
37. "$HELPER"
38
39# Initialize the helper
Luca Stefani5c60e4f2017-08-17 19:28:48 +020040setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT"
Christopher R. Palmer070fcfc2017-03-03 09:27:58 -050041
42# Copyright headers and guards
43write_headers
44
45write_makefiles "$MY_DIR"/proprietary-files.txt
46
Christopher R. Palmer070fcfc2017-03-03 09:27:58 -050047# Finish
48write_footers