s3ve3g-common: update blob extraction scripts
Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
This commit is contained in:
parent
00229976e8
commit
91d57b9431
|
@ -20,22 +20,22 @@ set -e
|
|||
|
||||
# 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
|
||||
|
||||
CM_ROOT="$MY_DIR"/../../..
|
||||
LINEAGE_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
HELPER="$CM_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"
|
||||
. "${HELPER}"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
SRC=adb
|
||||
else
|
||||
if [ $# -eq 1 ]; then
|
||||
SRC=$1
|
||||
SRC="${1}"
|
||||
else
|
||||
echo "$0: bad number of arguments"
|
||||
echo ""
|
||||
|
@ -48,19 +48,19 @@ else
|
|||
fi
|
||||
|
||||
# Initialize the helper for common device
|
||||
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true
|
||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true
|
||||
|
||||
extract "$MY_DIR"/common-proprietary-files.txt "$SRC"
|
||||
extract "${MY_DIR}/common-proprietary-files.txt" "${SRC}"
|
||||
|
||||
COMMON_BLOB_ROOT="$CM_ROOT"/vendor/"$VENDOR"/"$DEVICE_COMMON"/proprietary
|
||||
COMMON_BLOB_ROOT="${LINEAGE_ROOT}/vendor/${VENDOR}/${DEVICE_COMMON}/proprietary"
|
||||
|
||||
# Reinitialize the helper for device
|
||||
setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}"
|
||||
|
||||
for BLOB_LIST in "$MY_DIR"/../$DEVICE/device-proprietary-files*.txt; do
|
||||
extract $BLOB_LIST "$SRC"
|
||||
for BLOB_LIST in "${MY_DIR}/../${DEVICE}/device-proprietary-files*.txt"; do
|
||||
extract "${BLOB_LIST}" "${SRC}"
|
||||
done
|
||||
|
||||
./../msm8226-common/extract-files.sh $@
|
||||
|
||||
"$MY_DIR"/setup-makefiles.sh
|
||||
"${MY_DIR}/setup-makefiles.sh"
|
||||
|
|
|
@ -22,39 +22,39 @@ export INITIAL_COPYRIGHT_YEAR=2014
|
|||
|
||||
# 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
|
||||
|
||||
CM_ROOT="$MY_DIR"/../../..
|
||||
LINEAGE_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
HELPER="$CM_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"
|
||||
. "${HELPER}"
|
||||
|
||||
# Initialize the helper for common device
|
||||
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true
|
||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true
|
||||
|
||||
# Copyright headers and common guards
|
||||
write_headers "s3ve3gxx s3ve3gjv s3ve3gds"
|
||||
|
||||
write_makefiles "$MY_DIR"/common-proprietary-files.txt
|
||||
write_makefiles "${MY_DIR}/common-proprietary-files.txt"
|
||||
|
||||
write_footers
|
||||
|
||||
if [ ! -z $VARIANT_COPYRIGHT_YEAR ]; then
|
||||
export INITIAL_COPYRIGHT_YEAR=$VARIANT_COPYRIGHT_YEAR
|
||||
if [ ! -z "${VARIANT_COPYRIGHT_YEAR}" ]; then
|
||||
export INITIAL_COPYRIGHT_YEAR="${VARIANT_COPYRIGHT_YEAR}"
|
||||
fi
|
||||
|
||||
# Reinitialize the helper for device
|
||||
setup_vendor "$DEVICE" "$VENDOR" "$CM_ROOT"
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}"
|
||||
|
||||
# Copyright headers and guards
|
||||
write_headers
|
||||
|
||||
for BLOB_LIST in "$MY_DIR"/../$DEVICE/device-proprietary-files*.txt; do
|
||||
write_makefiles $BLOB_LIST
|
||||
for BLOB_LIST in "${MY_DIR}/../${DEVICE}/device-proprietary-files*.txt"; do
|
||||
write_makefiles ${BLOB_LIST}
|
||||
done
|
||||
|
||||
write_footers
|
||||
|
|
Loading…
Reference in New Issue