Compare commits
8 Commits
ebc3ade4c6
...
1.0.0
Author | SHA1 | Date | |
---|---|---|---|
1e91579e95 | |||
82bef38993 | |||
99295b0746 | |||
c518cd0023 | |||
ba34796215 | |||
dceb6a239d | |||
71068e4e40 | |||
b6e5d305d9 |
@ -9,10 +9,10 @@
|
||||
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/powered-by-gentoo-linux-tyrian.svg">
|
||||
</a>
|
||||
<a href="./LICENSE">
|
||||
<img src="https://img.shields.io/badge/license-GPLv3-blue.svg">
|
||||
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/license-gplv3-blue.svg">
|
||||
</a>
|
||||
<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 href="https://gitlab.com/src_prepare/scripts/commits/master.atom">
|
||||
<img src="https://gitlab.com/src_prepare/badge/-/raw/master/feed-atom-orange.svg">
|
||||
|
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
|
||||
|
||||
|
||||
# Original author: XGQT
|
||||
# Licensed under the ISC License
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# 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) 2020-2021, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
# Use this script to check which pkgs in a overlay might
|
||||
# be redundant - are in overlays other than the tested one
|
||||
|
||||
# Arguments:
|
||||
# 1 - overlay
|
||||
|
||||
# depends (heavily) on eix (1)
|
||||
|
||||
# Some eix options used here:
|
||||
# --exact
|
||||
# --force-color
|
||||
|
@ -34,7 +34,7 @@ if [ -d "${cache}" ]
|
||||
then
|
||||
if ! rm -fr "${cache}"
|
||||
then
|
||||
sudo rm -fr "${cache}" || exit 1
|
||||
su root -c "rm -fr ${cache}" || exit 1
|
||||
fi
|
||||
else
|
||||
echo "No pre-generated md5-cache found in ${cache}"
|
||||
|
@ -56,7 +56,7 @@ do
|
||||
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
|
||||
then
|
||||
echo "Switching to the root account"
|
||||
sudo ebuild "${ebuild}" clean test merge
|
||||
su root -c "ebuild ${ebuild} clean test merge"
|
||||
else
|
||||
ebuild "${ebuild}" clean test merge
|
||||
fi
|
||||
|
@ -27,7 +27,7 @@ trap 'exit 128' INT
|
||||
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
|
||||
|
||||
EAPI=7
|
||||
@ -55,10 +55,20 @@ BDEPEND=""
|
||||
DEPEND=""
|
||||
RDEPEND=""'
|
||||
|
||||
metadata_template='<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
metadata_template="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM \"http://www.gentoo.org/dtd/metadata.dtd\">
|
||||
<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() {
|
||||
|
Reference in New Issue
Block a user