summaryrefslogtreecommitdiff
path: root/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'common.sh')
-rwxr-xr-xcommon.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/common.sh b/common.sh
index 30a2a02..63cb36a 100755
--- a/common.sh
+++ b/common.sh
@@ -63,6 +63,28 @@ check_version() {
fi
}
+# Check to see that the stamp file was successfully updated
+validate_version() {
+ project="$1"
+ ID="$2"
+
+ VERSION=$(libcamera_version "$project")
+ last_build=$(buildstamp_filename $ID)
+ export VERSION
+ export last_build
+
+ ## Only rebuild on version change
+ touch "$last_build"
+
+ PREV_VERSION=$(cat "$last_build")
+
+ if [[ x"$PREV_VERSION" != x"$VERSION" ]] ; then
+ echo "$ID: Stamp file not set successfully"
+ exit 1
+ fi
+
+}
+
failure_report() {
echo "Subject: $0: $1 has failed"
echo ""