blob: afbc297472ae974192c0589719a6c6990221b9ed [file] [log] [blame]
#!/bin/bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
AOSP_TOP=$SCRIPT_DIR/../..
DATE=$(date +%Y%m%d)
SHA1=$(git log --pretty="%h" HEAD~1..HEAD)
VER=$DATE
# set the version file in the package
echo "TARGET_LINARO_VENDOR_VERSION := $VER" > $SCRIPT_DIR/version.mk
#tar it up
tar -czf $AOSP_TOP/vendor.tgz --exclude $AOSP_TOP/vendor/.git --exclude $SCRIPT_DIR/generate_vendor_package.sh --exclude $SCRIPT_DIR/extract-linaro_devices.sh-source $AOSP_TOP/vendor/
# prepend the extraction script
cp $SCRIPT_DIR/extract-linaro_devices.sh-source $AOSP_TOP/extract-linaro_devices-$VER.sh
cat $AOSP_TOP/vendor.tgz >> $AOSP_TOP/extract-linaro_devices-$VER.sh
# tar it again
tar -czf $AOSP_TOP/extract-linaro_devices-$VER.tgz $AOSP_TOP/extract-linaro_devices-$VER.sh
# cleanup: remove the temp/intermediate files
rm $AOSP_TOP/extract-linaro_devices-$VER.sh $AOSP_TOP/vendor.tgz