diff options
author | Erich Eckner <git@eckner.net> | 2021-12-13 17:36:44 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-12-13 17:36:44 +0100 |
commit | 3663ecc33f00f551eb08ce87f745905409e24257 (patch) | |
tree | 437d6dc811a33733b017c9889ef583445f7c6176 | |
parent | 4e1635d990a0bb6fd66c47d3772e6fe0b37de7a5 (diff) | |
download | archlinuxewe-3663ecc33f00f551eb08ce87f745905409e24257.tar.xz |
bumpPython: should use versions from database, not what is installed
-rwxr-xr-x | bumpPkgrel | 2 | ||||
-rwxr-xr-x | bumpPython | 26 |
2 files changed, 18 insertions, 10 deletions
diff --git a/bumpPkgrel b/bumpPkgrel index 54a45a0cd..741eb46e7 100755 --- a/bumpPkgrel +++ b/bumpPkgrel @@ -100,7 +100,7 @@ if [ $# -ne 1 ] || ${auto_detect}; then d ' \ | grep -qvxF "python>=${python_version}"; then - "${0%/*}/bumpPython" 3 + "${0%/*}/bumpPython" 3 "${python_version}" fi fi diff --git a/bumpPython b/bumpPython index 89c45146f..940be2150 100755 --- a/bumpPython +++ b/bumpPython @@ -5,13 +5,13 @@ cd $(dirname "${me}") usage() { >&2 echo 'usage:' - >&2 echo ' bumpPython 2' + >&2 echo ' bumpPython 2 [$version]' >&2 echo 'or:' - >&2 echo ' bumpPython 3' + >&2 echo ' bumpPython 3 [$version]' exit 1 } -if [ $# -ne 1 ]; then +if [ $# -ne 1 ] && [ $# -ne 2 ]; then usage fi @@ -21,17 +21,25 @@ case "$1" in pkgbuilds=( $(grep -l 'python>=2' */PKGBUILD) ) - pyver=$( - python2 --version 2>&1 - ) + if [ $# -eq 1 ]; then + pyver=$( + python2 --version 2>&1 + ) + else + pyver="$2" + fi ;; '3') pkgbuilds=( $(grep -l 'python>=3' */PKGBUILD) ) - pyver=$( - python --version 2>&1 - ) + if [ $# -eq 1 ]; then + pyver=$( + python --version 2>&1 + ) + else + pyver="$2" + fi ;; *) usage |