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

EAPI=8

DESCRIPTION="Various webshells"
HOMEPAGE="https://github.com/BlackArch/webshells"

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

LICENSE="Unlicense" # ??
SLOT="0"

src_install() {
	#remove .git dir
	if [[ ${PV} == *9999 ]]; then
		rm -r .git || die
	fi
	insinto "/usr/share/webshells"
	doins -r .

	dodoc README.md
}