2023-04-16 22:28:58 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -eu
|
2023-04-30 17:26:16 +02:00
|
|
|
|
2023-04-16 22:28:58 +02:00
|
|
|
export BUILDDIR=/tmp/build/ PKGDEST=/tmp/pkg
|
2023-04-30 17:26:16 +02:00
|
|
|
|
2023-04-16 22:28:58 +02:00
|
|
|
# shellcheck source=/dev/null
|
2023-04-30 17:26:16 +02:00
|
|
|
_lsb_release() {
|
|
|
|
. /etc/os-release || exit 1
|
|
|
|
echo "$ID"
|
|
|
|
}
|
2023-04-16 22:28:58 +02:00
|
|
|
DISTRIBUTION="$(_lsb_release)"
|
2023-04-30 17:26:16 +02:00
|
|
|
|
2023-04-16 22:28:58 +02:00
|
|
|
cd "$HOME/Projects/apparmor.d"
|
|
|
|
case "$DISTRIBUTION" in
|
2024-01-27 20:35:28 +01:00
|
|
|
arch)
|
|
|
|
make pkg
|
|
|
|
;;
|
2023-11-19 22:04:58 +01:00
|
|
|
debian | ubuntu | whonix)
|
2023-12-05 21:49:16 +01:00
|
|
|
sudo rm -rf debian/.debhelper/
|
2023-11-19 22:04:58 +01:00
|
|
|
make dpkg
|
|
|
|
sudo rm -rf debian/.debhelper/
|
|
|
|
;;
|
2023-12-05 21:49:16 +01:00
|
|
|
opensuse*) make rpm ;;
|
2023-04-16 22:28:58 +02:00
|
|
|
*) ;;
|
2023-04-30 17:26:16 +02:00
|
|
|
esac
|
2024-01-27 20:35:28 +01:00
|
|
|
|
|
|
|
sudo rm -rf /etc/apparmor/earlypolicy/
|
|
|
|
sudo systemctl restart apparmor || sudo systemctl status apparmor
|