src: add commit-ebuild, new-ebuild and update-submodules
This commit is contained in:
parent
3663b96dfb
commit
d9cd15f648
26
src/commit-ebuild
Executable file
26
src/commit-ebuild
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
trap 'exit 128' INT
|
||||
set -e
|
||||
export PATH
|
||||
|
||||
|
||||
pdir="$(git rev-parse --show-prefix)"
|
||||
|
||||
|
||||
FEATURES="sign"
|
||||
export FEATURES
|
||||
|
||||
|
||||
git add .
|
||||
|
||||
if [ -z "${1}" ]
|
||||
then
|
||||
repoman commit
|
||||
else
|
||||
repoman commit -m "${pdir%/}: ${*}"
|
||||
fi
|
||||
|
||||
git pull --verbose
|
||||
git push --verbose
|
56
src/new-ebuild
Executable file
56
src/new-ebuild
Executable file
@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
# shellcheck disable=2016
|
||||
|
||||
|
||||
trap 'exit 128' INT
|
||||
export PATH
|
||||
|
||||
|
||||
ebuild_template='# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DESCRIPTION=""
|
||||
HOMEPAGE=""
|
||||
|
||||
if [[ "\${PV}" == *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI=""
|
||||
else
|
||||
SRC_URI=""
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
RESTRICT="
|
||||
mirror
|
||||
!test? ( test )
|
||||
"
|
||||
LICENSE=""
|
||||
SLOT="0"
|
||||
IUSE="test"
|
||||
|
||||
BDEPEND=""
|
||||
DEPEND=""
|
||||
RDEPEND=""'
|
||||
|
||||
metadata_template='<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
</pkgmetadata>'
|
||||
|
||||
|
||||
if [ -f ../../profiles/repo_name ]
|
||||
then
|
||||
echo "${ebuild_template}" >> "$(basename "$(pwd)")-9999.ebuild"
|
||||
echo "${metadata_template}" >> "metadata.xml"
|
||||
else
|
||||
echo "Are you in a overlay repo?"
|
||||
echo "To use this script successfully:"
|
||||
echo "- create a \${CATEGOTY}/\${PN} directory"
|
||||
echo "- cd into it"
|
||||
echo "- execute ${0}"
|
||||
exit 1
|
||||
fi
|
13
src/update-submodules
Executable file
13
src/update-submodules
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
trap 'exit 128' INT
|
||||
export PATH
|
||||
|
||||
|
||||
git submodule update --init --recursive
|
||||
git submodule update --remote --merge
|
||||
git add .
|
||||
git commit -m "submodules update"
|
||||
git pull --verbose
|
||||
git push --verbose
|
Loading…
Reference in New Issue
Block a user