# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="A Linux Privilege Escalation Check Script"
HOMEPAGE="https://github.com/sleventyeleven/linuxprivchecker"

if [[ ${PV} != *9999 ]]; then
	EGIT_COMMIT="4135b3c6762e88c1b6984c4198eca12fdd4d144a"
	SRC_URI="https://github.com/sleventyeleven/linuxprivchecker/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
	S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
	KEYWORDS="amd64 x86"
else
	inherit git-r3
	EGIT_REPO_URI="https://github.com/sleventyeleven/linuxprivchecker"
fi

LICENSE="Unlicense"
SLOT="0"

src_install() {
	insinto /usr/share/linuxprivchecker
	doins linuxprivchecker.py

	dodoc *.md
}