src/new-ebuild: only create ebuilds if they don't exist
Signed-off-by: Maciej Barć <xgqt@protonmail.com>
This commit is contained in:
parent
f8e53b113b
commit
1aab1497bf
@ -42,10 +42,26 @@ metadata_template='<?xml version="1.0" encoding="UTF-8"?>
|
|||||||
</pkgmetadata>'
|
</pkgmetadata>'
|
||||||
|
|
||||||
|
|
||||||
|
main() {
|
||||||
|
ebuild="$(basename "$(pwd)")-9999.ebuild"
|
||||||
|
if [ ! -f "${ebuild}" ]
|
||||||
|
then
|
||||||
|
echo "${ebuild_template}" > "${ebuild}"
|
||||||
|
else
|
||||||
|
echo "Already exists: ${ebuild}"
|
||||||
|
fi
|
||||||
|
if [ ! -f "metadata.xml" ]
|
||||||
|
then
|
||||||
|
echo "${metadata_template}" > "metadata.xml"
|
||||||
|
else
|
||||||
|
echo "Already exists: metadata.xml"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if [ -f ../../profiles/repo_name ]
|
if [ -f ../../profiles/repo_name ]
|
||||||
then
|
then
|
||||||
echo "${ebuild_template}" >> "$(basename "$(pwd)")-9999.ebuild"
|
main
|
||||||
echo "${metadata_template}" >> "metadata.xml"
|
|
||||||
else
|
else
|
||||||
echo "Are you in a overlay repo?"
|
echo "Are you in a overlay repo?"
|
||||||
echo "To use this script successfully:"
|
echo "To use this script successfully:"
|
||||||
|
Loading…
Reference in New Issue
Block a user