sbc-images/scripts/validate-kickstart.sh
2023-09-13 06:59:56 +05:30

12 lines
357 B
Bash
Executable File

#!/usr/bin/env bash
KICKSTART_FILE='../Rocky.ks'
KICKSTART_VERSION="RHEL$(dnf config-manager --dump-variables | grep releasever | awk '{print $3}')"
if ! command -v ksvalidator > /dev/null; then
>&2 echo "$0: error: unable to find command 'ksvalidator'"
exit 1
fi
ksvalidator --followincludes --version "${KICKSTART_VERSION}" "${KICKSTART_FILE}"