diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-06-22 18:36:29 +0200 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-06-22 20:01:30 +0200 |
| commit | 4edc25c9282a9a6e264f1ffb3c9325d2cae20128 (patch) | |
| tree | a34b788d9015c697e9e15e0290c6566f81fda3f7 | |
| parent | a1ce579d0b4cc0921a25b0e0a84100a8f7c45b27 (diff) | |
| download | kde-4edc25c9282a9a6e264f1ffb3c9325d2cae20128.tar.gz kde-4edc25c9282a9a6e264f1ffb3c9325d2cae20128.tar.bz2 kde-4edc25c9282a9a6e264f1ffb3c9325d2cae20128.zip | |
Documentation: set-based-remove.sh: Commit using pkgcommit
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
| -rwxr-xr-x | Documentation/maintainers/new/set-based-remove.sh | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Documentation/maintainers/new/set-based-remove.sh b/Documentation/maintainers/new/set-based-remove.sh index 8922b7c3b81..3be839d5663 100755 --- a/Documentation/maintainers/new/set-based-remove.sh +++ b/Documentation/maintainers/new/set-based-remove.sh @@ -1,6 +1,10 @@ #!/bin/sh -# Requires app-portage/repoman +# Requires: +# app-portage/repoman +# Optional: +# dev-vcs/git +# app-portage/mgorny-dev-scripts . $(dirname "$0")/lib.sh @@ -10,11 +14,13 @@ help() { echo Simple set-based version removed. echo echo Given a set file, removes all packages of a specified version. + echo Optionally, if target is a git repository, each change will be + echo committed as \"cat/pn: drop VERSION*\". echo echo Reads TARGET_REPO from your environment, defaulting to the current directory. echo echo Usage: set-based-remove.sh SETNAME VERSION - echo Example: set-based-remove.sh kde-plasma-5.0 5.0.1 + echo Example: set-based-remove.sh kde-plasma-5.19 5.19.1 exit 0 } @@ -46,3 +52,14 @@ for package in ${packages} ; do repoman manifest popd > /dev/null done + +if [[ -d "${TARGET_REPO}/.git" ]] && hash git 2>/dev/null && hash pkgcommit 2>/dev/null; then + for cp in ${packages} ; do + pushd "${TARGET_REPO}/${cp}" > /dev/null + + git add . + pkgcommit -sS . -m "drop ${VERSION}*" + + popd > /dev/null + done +fi |
