github.com/ojongerius/docker@v1.11.2/hack/make/validate-default-seccomp (about) 1 #!/bin/bash 2 3 source "${MAKEDIR}/.validate" 4 5 IFS=$'\n' 6 files=( $(validate_diff --diff-filter=ACMR --name-only -- 'profiles/seccomp' || true) ) 7 unset IFS 8 9 if [ ${#files[@]} -gt 0 ]; then 10 # We run vendor.sh to and see if we have a diff afterwards 11 go generate ./profiles/seccomp/ >/dev/null 12 # Let see if the working directory is clean 13 diffs="$(git status --porcelain -- profiles/seccomp 2>/dev/null)" 14 if [ "$diffs" ]; then 15 { 16 echo 'The result of go generate ./profiles/seccomp/ differs' 17 echo 18 echo "$diffs" 19 echo 20 echo 'Please re-run go generate ./profiles/seccomp/' 21 echo 22 } >&2 23 false 24 else 25 echo 'Congratulations! Seccomp profile generation is done correctly.' 26 fi 27 fi