1#!/usr/bin/env bash
2# SPDX-License-Identifier: LGPL-2.1-or-later
3set -eu
4set -o pipefail
5
6${1:?} -dM -include linux/capability.h -include "${2:?}" -include "${3:?}" - </dev/null | \
7       awk '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $2; }' | \
8       grep -v CAP_LAST_CAP
9