~rcr/rirc

eeca862bf9be4991eac8052975ccf1bcf4cc7d9f — Richard Robbins 29 days ago 9f9ab81
add entr.sh, cleanup scripts
5 files changed, 24 insertions(+), 7 deletions(-)

D .gitmodules
A scripts/entr.sh
M scripts/sa_coverity_get.sh
M scripts/sa_coverity_run.sh
M scripts/sa_sonarcloud_get.sh
D .gitmodules => .gitmodules +0 -0
A scripts/entr.sh => scripts/entr.sh +17 -0
@@ 0,0 1,17 @@
#!/bin/bash

# Usage: entr.sh [make targets]
#   e.g.:
#     $ clang-entr.sh
#     $ clang-entr.sh check
#     $ clang-entr.sh all check

set -e

export MAKEFLAGS="-j $(nproc)"

make clean

find -name '*.c' \
  -o -name '*.h' \
  -o -name Makefile | grep -v './lib/' | entr -c make "$@"

M scripts/sa_coverity_get.sh => scripts/sa_coverity_get.sh +3 -3
@@ 21,9 21,9 @@ mkdir -p "$DIR"

echo "*" > "$DIR/.gitignore"

curl -fs --show-error https://scan.coverity.com/download/linux64 -o "$COVERITY_MD5" --data "token=$COVERITY_TOKEN&project=rcr%2Frirc&md5=1"
curl -fs --show-error https://scan.coverity.com/download/linux64 -o "$COVERITY_TGZ" --data "token=$COVERITY_TOKEN&project=rcr%2Frirc"
curl -fsS https://scan.coverity.com/download/linux64 -o "$COVERITY_MD5" --data "token=$COVERITY_TOKEN&project=rcr%2Frirc&md5=1"
curl -fsS https://scan.coverity.com/download/linux64 -o "$COVERITY_TGZ" --data "token=$COVERITY_TOKEN&project=rcr%2Frirc"

printf "%s\t$COVERITY_TGZ" "$(cat "$COVERITY_MD5")" | md5sum --quiet -c -

tar xzf "$COVERITY_TGZ" -C "$DIR" --strip-components 1
tar -xzf "$COVERITY_TGZ" -C "$DIR" --strip-components 1

M scripts/sa_coverity_run.sh => scripts/sa_coverity_run.sh +1 -1
@@ 30,7 30,7 @@ make libs

cov-build --dir "$COVERITY_OUT" make all check

tar czf "$COVERITY_TAR" "$COVERITY_OUT"
tar -czf "$COVERITY_TAR" "$COVERITY_OUT"

curl https://scan.coverity.com/builds?project=rcr%2Frirc \
	--form description="$VERSION" \

M scripts/sa_sonarcloud_get.sh => scripts/sa_sonarcloud_get.sh +3 -3
@@ 22,9 22,9 @@ mkdir -p "$1"

echo "*" > "$1/.gitignore"

curl -fs --show-error "$BUILD_ZIP_URL" -o "$BUILD_ZIP"
curl -fs --show-error "$SONAR_ZIP_URL" -o "$SONAR_ZIP"
curl -fs --show-error "$SONAR_MD5_URL" -o "$SONAR_MD5"
curl -fsS "$BUILD_ZIP_URL" -o "$BUILD_ZIP"
curl -fsS "$SONAR_ZIP_URL" -o "$SONAR_ZIP"
curl -fsS "$SONAR_MD5_URL" -o "$SONAR_MD5"

printf "%s\t$SONAR_ZIP" "$(cat "$SONAR_MD5")" | md5sum --quiet -c -