AtomBusMon/release.sh
David Banks f84780b304 Minor change to release.sh script
Change-Id: I0f73afe8967909be1a7a3784c64555df2ed4eb16
2017-07-28 15:07:12 +01:00

32 lines
446 B
Bash
Executable File

#!/bin/bash
DATE=$(date +"%Y%m%d_%H%M")
VERSION=$(grep "define VERSION" firmware/AtomBusMon.c | cut -d\" -f2 | tr -d "." )
NAME=ice_${DATE}_${VERSION}
DIR=releases/$NAME/
echo "Building release in: "${DIR}
mkdir -p ${DIR}
pushd target
make clean
make
cp --parents */*/*.bit ../${DIR}
cp --parents */*/*.mcs ../${DIR}
popd
pushd releases
zip -qr ${NAME}.zip ${NAME}
popd
echo "Built release in: "${DIR}
unzip -l releases/${NAME}.zip