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

EAPI=8

DESCRIPTION="Shell script to check for simple privilege escalation vectors"
HOMEPAGE="https://github.com/pentestmonkey/unix-privesc-check"

if [[ ${PV} != *9999 ]]; then
	inherit vcs-snapshot
	EGIT_COMMIT="c7d27e8a2d2d54540778c6d7c1c5bcc290dbba1a"
	SRC_URI="https://github.com/pentestmonkey/unix-privesc-check/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~x86"
else
	EGIT_REPO_URI="https://github.com/pentestmonkey/unix-privesc-check"
	inherit git-r3
fi

LICENSE="GPL-2+"
SLOT="0"

src_install() {
	insinto /usr/share/unix-privesc-check
	doins -r lib/ tools/ upc.sh
	dodoc -r doc/* README.md
}