summaryrefslogtreecommitdiff
path: root/bumpPython
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-12-13 17:36:44 +0100
committerErich Eckner <git@eckner.net>2021-12-13 17:36:44 +0100
commit3663ecc33f00f551eb08ce87f745905409e24257 (patch)
tree437d6dc811a33733b017c9889ef583445f7c6176 /bumpPython
parent4e1635d990a0bb6fd66c47d3772e6fe0b37de7a5 (diff)
downloadarchlinuxewe-3663ecc33f00f551eb08ce87f745905409e24257.tar.xz
bumpPython: should use versions from database, not what is installed
Diffstat (limited to 'bumpPython')
-rwxr-xr-xbumpPython26
1 files changed, 17 insertions, 9 deletions
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