Compare commits
17 Commits
f79df00c30
...
1.1.0
Author | SHA1 | Date | |
---|---|---|---|
850ca56ff7 | |||
c6b6f6062d | |||
ba55fe2f2d | |||
e2cd817f72 | |||
8945817ba4 | |||
c0570e273b | |||
9987663dc4 | |||
1e91579e95 | |||
82bef38993 | |||
99295b0746 | |||
c518cd0023 | |||
ba34796215 | |||
dceb6a239d | |||
71068e4e40 | |||
b6e5d305d9 | |||
ebc3ade4c6 | |||
80202c3151 |
@ -2,8 +2,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,7 +12,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
37
README.md
37
README.md
@ -1,20 +1,51 @@
|
||||
# Scripts
|
||||
|
||||
<p align="center">
|
||||
<a href="https://gitlab.com/src_prepare/scripts/pipelines">
|
||||
<img src="https://gitlab.com/src_prepare/scripts/badges/master/pipeline.svg">
|
||||
</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/">
|
||||
<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-ISC-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">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# Scripts
|
||||
|
||||
# About
|
||||
|
||||
Miscellaneous maintenance scripts by src_prepare group
|
||||
|
||||
|
||||
# License
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
## Unless otherwise stated contents here are under the GNU GPL v3 license
|
||||
|
||||
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, version 3.
|
||||
|
||||
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/>.
|
||||
|
||||
Copyright (c) 2020-2021, src_prepare group
|
||||
Licensed under the GNU GPL v3 License
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
76
src/check-duplicates
Executable file
76
src/check-duplicates
Executable file
@ -0,0 +1,76 @@
|
||||
#!/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, version 3.
|
||||
|
||||
# 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@riseup.net>
|
||||
# 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,30 @@
|
||||
#!/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, version 3.
|
||||
|
||||
# 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@riseup.net>
|
||||
# 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
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
@ -34,7 +33,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}"
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
@ -26,21 +25,53 @@ set -e
|
||||
export PATH
|
||||
|
||||
|
||||
pdir="$(git rev-parse --show-prefix)"
|
||||
|
||||
|
||||
FEATURES="sign"
|
||||
export FEATURES
|
||||
|
||||
|
||||
package_directory="$(git rev-parse --show-prefix)"
|
||||
package="${package_directory%/}"
|
||||
|
||||
|
||||
error_no_version() {
|
||||
echo "[ERROR]: No version given"
|
||||
echo " Ran with option: ${1}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
git add .
|
||||
|
||||
if [ -z "${1}" ]
|
||||
then
|
||||
repoman commit
|
||||
else
|
||||
repoman commit -m "${pdir%/}: ${*}"
|
||||
fi
|
||||
|
||||
git pull --verbose
|
||||
git push --verbose
|
||||
case "${1}"
|
||||
in
|
||||
"" )
|
||||
echo "[DEBUG]: no additional arguments/options given"
|
||||
repoman commit
|
||||
;;
|
||||
-b | --bump )
|
||||
echo "[DEBUG]: to be: ${package}: bump to ${2}"
|
||||
if [ -n "${2}" ]
|
||||
then
|
||||
repoman commit -m "${package}: bump to ${2}"
|
||||
else
|
||||
error_no_version "${1}"
|
||||
fi
|
||||
;;
|
||||
-d | --drop )
|
||||
echo "[DEBUG]: to be: ${package}: drop old ${2}"
|
||||
if [ -n "${2}" ]
|
||||
then
|
||||
repoman commit -m "${package}: drop old ${2}"
|
||||
else
|
||||
error_no_version "${1}"
|
||||
fi
|
||||
;;
|
||||
-* )
|
||||
echo "[ERROR]: Unknown option ${1}"
|
||||
exit 1
|
||||
;;
|
||||
* )
|
||||
echo "[DEBUG]: to be: ${package}: ${*}"
|
||||
repoman commit -m "${package}: ${*}"
|
||||
;;
|
||||
esac
|
||||
|
13
src/eball
13
src/eball
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
@ -30,9 +29,9 @@ usage() {
|
||||
Usage: eball FILES
|
||||
eball - test new ebuilds
|
||||
|
||||
Original author: XGQT
|
||||
Copyright (c) 2020, src_prepare group
|
||||
Licensed under the ISC License
|
||||
Original author: Maciej Barć
|
||||
Copyright (c) 2020-2021, src_prepare group
|
||||
Licensed under the GPLv3
|
||||
HELP
|
||||
}
|
||||
|
||||
@ -56,7 +55,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
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
@ -1,15 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
####################################################
|
||||
#
|
||||
# SRC_PREPARE
|
||||
#
|
||||
# Marcin Woźniak
|
||||
# y0rune@aol.com
|
||||
#
|
||||
# Last edit: 16-09-2020
|
||||
#
|
||||
###################################################
|
||||
# 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, version 3.
|
||||
|
||||
# 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(){
|
||||
EUSCAN=$(euscan --nocolor --quiet "$1")
|
||||
@ -73,8 +80,8 @@ function help(){
|
||||
echo "* -f or --folder <FOLDER-NAME>"
|
||||
echo
|
||||
echo "Example of usage"
|
||||
echo "./logeuscan -r src_prepare-overlay"
|
||||
echo "./logeuscan -f ~/git/src_prepare-overlay"
|
||||
echo "./euscan-parallel -r src_prepare-overlay"
|
||||
echo "./euscan-parallel -f ~/git/src_prepare-overlay"
|
||||
}
|
||||
|
||||
function main(){
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
@ -6,8 +6,7 @@ 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.
|
||||
the Free Software Foundation, version 3.
|
||||
|
||||
scripts is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -17,8 +16,8 @@ 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, src_prepare group
|
||||
Original author: Maciej Barć <xgqt@riseup.net>
|
||||
Copyright (c) 2020-2021, src_prepare group
|
||||
Licensed under the GNU GPL v3 License
|
||||
|
||||
Install Ebuild Dependencies
|
||||
@ -30,12 +29,13 @@ to emerge dependencies we would just do "emerge --oneshot --onlydeps PKG".
|
||||
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
from subprocess import call
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Install Ebuild Dependencies",
|
||||
epilog="Copyright (c) 2020, src_prepare group (License: ISC)"
|
||||
epilog="Copyright (c) 2020-2021, src_prepare group (License: GPLv3)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"ebuild",
|
||||
@ -46,16 +46,14 @@ args = parser.parse_args()
|
||||
|
||||
|
||||
def pkg_name(pkg_str):
|
||||
"""Parse string and return a pkg name"""
|
||||
"""
|
||||
Parse string and return a pkg name.
|
||||
"""
|
||||
|
||||
# TODO: don't strip but force
|
||||
|
||||
proper = ""
|
||||
|
||||
# Strip required use
|
||||
for i in ["["]:
|
||||
if i in pkg_str:
|
||||
proper = pkg_str.split(i)[0]
|
||||
proper = pkg_str.split("[")[0]
|
||||
|
||||
# Strip conditional use
|
||||
for i in ["$", "DEPEND", "||", "!", "?", "(", ")"]:
|
||||
@ -66,12 +64,21 @@ def pkg_name(pkg_str):
|
||||
|
||||
|
||||
def ebuild_deps(ebuild_file):
|
||||
"""Returns dependencies from a ebuild file"""
|
||||
"""
|
||||
Returns dependencies from a ebuild file.
|
||||
"""
|
||||
|
||||
deps = []
|
||||
adddeps = False
|
||||
|
||||
with open(ebuild_file) as ebuild:
|
||||
for line in ebuild.read().splitlines():
|
||||
if adddeps:
|
||||
|
||||
# TODO: Find a better way to find the depend "block"
|
||||
if "DEPEND" in line:
|
||||
adddeps = True
|
||||
|
||||
elif adddeps:
|
||||
# TODO: Find a better pkg match method
|
||||
if "/" in line:
|
||||
deps.append(
|
||||
@ -79,16 +86,20 @@ def ebuild_deps(ebuild_file):
|
||||
)
|
||||
elif "\"" in line:
|
||||
adddeps = False
|
||||
# TODO: Find a better way to find the depend "block"
|
||||
elif "DEPEND" in line:
|
||||
adddeps = True
|
||||
|
||||
return deps
|
||||
|
||||
|
||||
def main():
|
||||
"""The main function"""
|
||||
"""
|
||||
The main function.
|
||||
"""
|
||||
print("Ebuilds:", args.ebuild)
|
||||
|
||||
if args.ebuild == []:
|
||||
print("[ERROR]: No ebuilds given")
|
||||
sys.exit(1)
|
||||
|
||||
all_deps = []
|
||||
|
||||
for ebuild in args.ebuild:
|
||||
|
@ -6,8 +6,7 @@ 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.
|
||||
the Free Software Foundation, version 3.
|
||||
|
||||
scripts is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -17,7 +16,7 @@ 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)
|
||||
Original author: Maciej Barć <xgqt@riseup.net>
|
||||
Copyright (c) 2020, src_prepare group
|
||||
Licensed under the GNU GPL v3 License
|
||||
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
@ -27,7 +26,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
|
||||
@ -36,16 +35,16 @@ DESCRIPTION=""
|
||||
HOMEPAGE=""
|
||||
|
||||
if [[ "${PV}" == *9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI=""
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI=""
|
||||
else
|
||||
SRC_URI=""
|
||||
KEYWORDS="~amd64"
|
||||
SRC_URI=""
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
RESTRICT="
|
||||
mirror
|
||||
!test? ( test )
|
||||
mirror
|
||||
!test? ( test )
|
||||
"
|
||||
LICENSE=""
|
||||
SLOT="0"
|
||||
@ -55,10 +54,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() {
|
||||
|
5
src/pn
5
src/pn
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
@ -4,8 +4,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
5
test.sh
5
test.sh
@ -5,8 +5,7 @@
|
||||
|
||||
# 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.
|
||||
# the Free Software Foundation, version 3.
|
||||
|
||||
# scripts is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,7 +15,7 @@
|
||||
# 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)
|
||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||
# Copyright (c) 2020, src_prepare group
|
||||
# Licensed under the GNU GPL v3 License
|
||||
|
||||
|
Reference in New Issue
Block a user