diff options
-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 |