blob: 6cc9266f101d681acb979217b2a2c369537f8960 [file] [log] [blame]
John Stultzf2a35d52021-12-16 05:48:59 +00001#!/bin/bash
2set -x
3
4SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
5
6DATE=$(date +%Y%m%d)
7SHA1=$(git log --pretty="%h" HEAD~1..HEAD)
8VER=$DATE
9
10SRC_DIR=$SCRIPT_DIR/src/
John Stultzd6997a22022-01-06 00:20:44 +000011TARGET_DIR=out/vendor/linaro/
John Stultzf2a35d52021-12-16 05:48:59 +000012
13
John Stultz479a7c92022-02-02 05:54:07 +000014DEV_TARGETS="db845c rb5 linux-firmware hikey960"
John Stultzf2a35d52021-12-16 05:48:59 +000015
John Stultzd6997a22022-01-06 00:20:44 +000016for DEV in $DEV_TARGETS; do
17 DEV_TARGET_DIR=$TARGET_DIR/$DEV/$VER
18
19 #Create and copy the files into the out dir
20 mkdir -p $DEV_TARGET_DIR
21 cp -r $SRC_DIR/$DEV/* $DEV_TARGET_DIR/
22
23 # set the version file in the package
24 echo "TARGET_LINARO_VENDOR_VERSION := $VER" > $DEV_TARGET_DIR/version.mk
25done
26
27# Copy the toplevel items
28cp $SRC_DIR/README $TARGET_DIR/
29cp $SRC_DIR/android-info.txt $TARGET_DIR/
John Stultzf2a35d52021-12-16 05:48:59 +000030
31#tar it up
32tar -C out -czf out/vendor.tgz vendor/
33
34# prepend the extraction script
35cp $SCRIPT_DIR/extract-linaro_devices.sh-source out/extract-linaro_devices-$VER.sh
36cat out/vendor.tgz >> out/extract-linaro_devices-$VER.sh
37
38# tar it again
39tar -C out -czf out/extract-linaro_devices-$VER.tgz extract-linaro_devices-$VER.sh
40
41# cleanup: remove the temp/intermediate files
42rm out/extract-linaro_devices-$VER.sh out/vendor.tgz
43rm -rf out/vendor