summaryrefslogtreecommitdiff
path: root/scripts/coverity.sh
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-22 08:27:29 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-11-22 08:27:29 +0100
commit61a0dd71c4b69c21ee4aacdc0459dba58504a24a (patch)
tree6a26980ffa225421229e7d5da5b901da198fea29 /scripts/coverity.sh
parent47e531197b18a0e9806bf8e3a2e69f203f5efd13 (diff)
Move helper scripts to scripts/ sub directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'scripts/coverity.sh')
-rwxr-xr-xscripts/coverity.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/scripts/coverity.sh b/scripts/coverity.sh
new file mode 100755
index 0000000..422ed85
--- /dev/null
+++ b/scripts/coverity.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+COVERITY_PATH="$HOME/Downloads/cov-analysis-linux64-2022.6.0"
+TOKEN=$(cat "$HOME/.coverity/squashfs-tools-ng")
+EMAIL=$(git log --follow --pretty=format:"%ae" -- coverity.sh | head -n 1)
+
+DESCRIPTION=$(git describe --always --tags --dirty)
+VERSION=$(grep AC_INIT configure.ac | grep -o \\[[0-9.]*\\] | tr -d [])
+
+export PATH="$COVERITY_PATH/bin:$PATH"
+
+if [ $# -eq 1 ]; then
+ case "$1" in
+ --32bit)
+ ./autogen.sh
+ ./configure CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32"
+ DESCRIPTION="$DESCRIPTION-32bit"
+ ;;
+ *)
+ echo "Unknown option `$1`" >&2
+ exit 1
+ ;;
+ esac
+else
+ ./autogen.sh
+ ./configure
+fi
+
+make clean
+cov-build --dir cov-int make -j
+tar czvf squashfs-tools-ng.tgz cov-int
+
+echo "Uploading tarball with the following settings:"
+echo "Email: $EMAIL"
+echo "Version: $VERSION"
+echo "Description: $DESCRIPTION"
+
+curl --form token="$TOKEN" \
+ --form email="$EMAIL" \
+ --form file=@squashfs-tools-ng.tgz \
+ --form version="$VERSION" \
+ --form description="$DESCRIPTION" \
+ https://scan.coverity.com/builds?project=squashfs-tools-ng