Compare commits
10 Commits
f79df00c30
...
1.0.0
Author | SHA1 | Date | |
---|---|---|---|
1e91579e95 | |||
82bef38993 | |||
99295b0746 | |||
c518cd0023 | |||
ba34796215 | |||
dceb6a239d | |||
71068e4e40 | |||
b6e5d305d9 | |||
ebc3ade4c6 | |||
80202c3151 |
@ -2,19 +2,24 @@
|
|||||||
<a href="https://gitlab.com/src_prepare/scripts/pipelines">
|
<a href="https://gitlab.com/src_prepare/scripts/pipelines">
|
||||||
<img src="https://gitlab.com/src_prepare/scripts/badges/master/pipeline.svg">
|
<img src="https://gitlab.com/src_prepare/scripts/badges/master/pipeline.svg">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="https://gitlab.com/src_prepare/scripts/">
|
||||||
|
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/hosted_on-gitlab-orange.svg">
|
||||||
|
</a>
|
||||||
<a href="https://gentoo.org/">
|
<a href="https://gentoo.org/">
|
||||||
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/powered-by-gentoo-linux-tyrian.svg">
|
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/powered-by-gentoo-linux-tyrian.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="./LICENSE">
|
<a href="./LICENSE">
|
||||||
<img src="https://img.shields.io/badge/license-ISC-blue.svg">
|
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/license-gplv3-blue.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://app.element.io/#/room/#src_prepare:matrix.org">
|
<a href="https://app.element.io/#/room/#src_prepare:matrix.org">
|
||||||
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/chat-matrix-blue.svg">
|
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/chat-matrix-green.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://gitlab.com/src_prepare/scripts/commits/master.atom">
|
<a href="https://gitlab.com/src_prepare/scripts/commits/master.atom">
|
||||||
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/feed-atom-orange.svg">
|
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/feed-atom-orange.svg">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
|
|
||||||
Miscellaneous maintenance scripts by src_prepare group
|
Miscellaneous maintenance scripts by src_prepare group
|
||||||
|
77
src/check-duplicates
Executable file
77
src/check-duplicates
Executable file
@ -0,0 +1,77 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
|
# This file is part of scripts.
|
||||||
|
|
||||||
|
# scripts is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# scripts is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Original author: Maciej Barć <xgqt@protonmail.com>
|
||||||
|
# Copyright (c) 2021, src_prepare group
|
||||||
|
# Licensed under the GNU GPL v3 License
|
||||||
|
|
||||||
|
# Fork of 'portdupe' from Gentoo science reporitory, original by omp:
|
||||||
|
# Copyright 2006 David Shakaryan <omp@gentoo.org>
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# This one upgrades the license to GNU General Public License v3
|
||||||
|
|
||||||
|
# shellcheck disable=1117
|
||||||
|
|
||||||
|
|
||||||
|
trap 'exit 128' INT
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
|
||||||
|
PORTDIR="$(portageq get_repo_path / gentoo)"
|
||||||
|
|
||||||
|
|
||||||
|
# If an argument is present, use it as the overlay directory.
|
||||||
|
if [ "${1}" ]
|
||||||
|
then
|
||||||
|
cd "${1}" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Checking, displaying, etc.
|
||||||
|
for PACKAGE in */*
|
||||||
|
do
|
||||||
|
if [ -d "${PORTDIR}/${PACKAGE}" ] \
|
||||||
|
&& [[ $(basename "${PACKAGE}") != "CVS" ]] \
|
||||||
|
&& grep -q "$(dirname "${PACKAGE}")" "${PORTDIR}/profiles/categories"
|
||||||
|
then
|
||||||
|
# Reset versions from last package checked.
|
||||||
|
PORTPACK_VERS=""
|
||||||
|
OVERPACK_VERS=""
|
||||||
|
|
||||||
|
# Find just package name excluding category.
|
||||||
|
PACKAGE_BASE="$(basename "${PACKAGE}")"
|
||||||
|
|
||||||
|
# Find versions of package in portage.
|
||||||
|
for PORTPACK in $(find "${PORTDIR}/${PACKAGE}" -name "*.ebuild" | sed -e 's/.ebuild//')
|
||||||
|
do
|
||||||
|
PORTPACK_VER="$(basename "${PORTPACK}" | sed "s/${PACKAGE_BASE}-//")"
|
||||||
|
PORTPACK_VERS="${PORTPACK_VERS} ${PORTPACK_VER}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Find versions of package in overlay.
|
||||||
|
for OVERPACK in $(find "${PACKAGE}" -name "*.ebuild" | sed -e 's/.ebuild//')
|
||||||
|
do
|
||||||
|
OVERPACK_VER="$(basename "${OVERPACK}" | sed "s/${PACKAGE_BASE}-//")"
|
||||||
|
OVERPACK_VERS="${OVERPACK_VERS} ${OVERPACK_VER}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Output info with colors.
|
||||||
|
echo -e "\e[1;33m${PACKAGE}\e[0m"
|
||||||
|
echo -e " \e[1;35mPortage:\e[0m${PORTPACK_VERS}"
|
||||||
|
echo -e " \e[1;35mOverlay:\e[0m${OVERPACK_VERS}"
|
||||||
|
fi
|
||||||
|
done
|
@ -1,18 +1,31 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
# Original author: XGQT
|
# This file is part of scripts.
|
||||||
# Licensed under the ISC License
|
|
||||||
# Copyright (c) 2020, src_prepare group
|
# scripts is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# scripts is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Original author: Maciej Barć <xgqt@protonmail.com>
|
||||||
|
# Copyright (c) 2020-2021, src_prepare group
|
||||||
|
# Licensed under the GNU GPL v3 License
|
||||||
|
|
||||||
# Use this script to check which pkgs in a overlay might
|
# Use this script to check which pkgs in a overlay might
|
||||||
# be redundant - are in overlays other than the tested one
|
# be redundant - are in overlays other than the tested one
|
||||||
|
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# 1 - overlay
|
# 1 - overlay
|
||||||
|
|
||||||
# depends (heavily) on eix (1)
|
# depends (heavily) on eix (1)
|
||||||
|
|
||||||
# Some eix options used here:
|
# Some eix options used here:
|
||||||
# --exact
|
# --exact
|
||||||
# --force-color
|
# --force-color
|
||||||
|
@ -34,7 +34,7 @@ if [ -d "${cache}" ]
|
|||||||
then
|
then
|
||||||
if ! rm -fr "${cache}"
|
if ! rm -fr "${cache}"
|
||||||
then
|
then
|
||||||
sudo rm -fr "${cache}" || exit 1
|
su root -c "rm -fr ${cache}" || exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "No pre-generated md5-cache found in ${cache}"
|
echo "No pre-generated md5-cache found in ${cache}"
|
||||||
|
@ -56,7 +56,7 @@ do
|
|||||||
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
|
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
|
||||||
then
|
then
|
||||||
echo "Switching to the root account"
|
echo "Switching to the root account"
|
||||||
sudo ebuild "${ebuild}" clean test merge
|
su root -c "ebuild ${ebuild} clean test merge"
|
||||||
else
|
else
|
||||||
ebuild "${ebuild}" clean test merge
|
ebuild "${ebuild}" clean test merge
|
||||||
fi
|
fi
|
||||||
|
@ -1,15 +1,23 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
####################################################
|
# This file is part of scripts.
|
||||||
#
|
|
||||||
# SRC_PREPARE
|
# scripts is free software: you can redistribute it and/or modify
|
||||||
#
|
# it under the terms of the GNU General Public License as published by
|
||||||
# Marcin Woźniak
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
# y0rune@aol.com
|
# (at your option) any later version.
|
||||||
#
|
|
||||||
# Last edit: 16-09-2020
|
# scripts is distributed in the hope that it will be useful,
|
||||||
#
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
###################################################
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Original author: Marcin Woźniak (y0rune@aol.com)
|
||||||
|
# Copyright (c) 2020, src_prepare group
|
||||||
|
# Licensed under the GNU GPL v3 License
|
||||||
|
|
||||||
function scanning(){
|
function scanning(){
|
||||||
EUSCAN=$(euscan --nocolor --quiet "$1")
|
EUSCAN=$(euscan --nocolor --quiet "$1")
|
||||||
@ -73,8 +81,8 @@ function help(){
|
|||||||
echo "* -f or --folder <FOLDER-NAME>"
|
echo "* -f or --folder <FOLDER-NAME>"
|
||||||
echo
|
echo
|
||||||
echo "Example of usage"
|
echo "Example of usage"
|
||||||
echo "./logeuscan -r src_prepare-overlay"
|
echo "./euscan-parallel -r src_prepare-overlay"
|
||||||
echo "./logeuscan -f ~/git/src_prepare-overlay"
|
echo "./euscan-parallel -f ~/git/src_prepare-overlay"
|
||||||
}
|
}
|
||||||
|
|
||||||
function main(){
|
function main(){
|
@ -27,7 +27,7 @@ trap 'exit 128' INT
|
|||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
|
|
||||||
ebuild_template='# Copyright 1999-2020 Gentoo Authors
|
ebuild_template='# Copyright 1999-2021 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=7
|
||||||
@ -36,16 +36,16 @@ DESCRIPTION=""
|
|||||||
HOMEPAGE=""
|
HOMEPAGE=""
|
||||||
|
|
||||||
if [[ "${PV}" == *9999* ]]; then
|
if [[ "${PV}" == *9999* ]]; then
|
||||||
inherit git-r3
|
inherit git-r3
|
||||||
EGIT_REPO_URI=""
|
EGIT_REPO_URI=""
|
||||||
else
|
else
|
||||||
SRC_URI=""
|
SRC_URI=""
|
||||||
KEYWORDS="~amd64"
|
KEYWORDS="~amd64"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RESTRICT="
|
RESTRICT="
|
||||||
mirror
|
mirror
|
||||||
!test? ( test )
|
!test? ( test )
|
||||||
"
|
"
|
||||||
LICENSE=""
|
LICENSE=""
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
@ -55,10 +55,20 @@ BDEPEND=""
|
|||||||
DEPEND=""
|
DEPEND=""
|
||||||
RDEPEND=""'
|
RDEPEND=""'
|
||||||
|
|
||||||
metadata_template='<?xml version="1.0" encoding="UTF-8"?>
|
metadata_template="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
<!DOCTYPE pkgmetadata SYSTEM \"http://www.gentoo.org/dtd/metadata.dtd\">
|
||||||
<pkgmetadata>
|
<pkgmetadata>
|
||||||
</pkgmetadata>'
|
<maintainer type=\"person\">
|
||||||
|
<email>$(git config --get user.email)</email>
|
||||||
|
<name>$(git config --get user.name)</name>
|
||||||
|
</maintainer>
|
||||||
|
<longdescription lang=\"en\">
|
||||||
|
CHANGEME
|
||||||
|
</longdescription>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type=\"CHANGEME\">CHANGEME</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>"
|
||||||
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
Reference in New Issue
Block a user