diff options
Diffstat (limited to 'setup-makefiles.sh')
-rwxr-xr-x | setup-makefiles.sh | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 65975ec..701d3ad 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -22,40 +22,39 @@ INITIAL_COPYRIGHT_YEAR=2017 # Load extract_utils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" -if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi +if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi -LINEAGE_ROOT="$MY_DIR"/../../.. +LINEAGE_ROOT="${MY_DIR}/../../.." -HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh -if [ ! -f "$HELPER" ]; then - echo "Unable to find helper script at $HELPER" +HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh" +if [ ! -f "${HELPER}" ]; then + echo "Unable to find helper script at ${HELPER}" exit 1 fi -. "$HELPER" +source "${HELPER}" # Initialize the helper for common -setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true +setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true # Copyright headers and guards write_headers "z2_plus z2_row" # The standard common blobs -write_makefiles "$MY_DIR"/proprietary-files.txt true +write_makefiles "${MY_DIR}/proprietary-files.txt" true -# We are done! +# Finish write_footers -if [ -s "$MY_DIR"/../"$DEVICE"/proprietary-files.txt ]; then +if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then # Reinitialize the helper for device - INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR" - setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false + setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false # Copyright headers and guards write_headers # The standard device blobs - write_makefiles "$MY_DIR"/../"$DEVICE"/proprietary-files.txt true + write_makefiles "${MY_DIR}/../${DEVICE}/proprietary-files.txt" true - # We are done! + # Finish write_footers fi |