summaryrefslogtreecommitdiffstats
path: root/src/basic/generate-cap-list.sh
blob: 53abdd9a72238086706dce03d2fce2c464f0d55f (plain)
1
2
3
4
5
6
7
8
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu
set -o pipefail

${1:?} -dM -include linux/capability.h -include "${2:?}" -include "${3:?}" - </dev/null | \
       awk '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $2; }' | \
       grep -v CAP_LAST_CAP