]> arthur.barton.de Git - bup.git/blobdiff - dev/prep-for-freebsd-build
cirrus: fill out python 3 tests
[bup.git] / dev / prep-for-freebsd-build
index e56425984ae0070f2d2ae87f3c5e1d8c978e09bd..609f8748df693873f3df5483df25db9c38a3a939 100755 (executable)
@@ -1,11 +1,30 @@
 #!/bin/sh
 
-set -ex
+set -exu
+
+usage()
+{
+    echo "Usage: prep-for-freebsd-build [python2|python3]"
+}
+
+common_pkgs='gmake git bash rsync curl par2cmdline readline duplicity'
+common_pkgs="$common_pkgs rdiff-backup rsnapshot"
+
+pyver="${1:-python2}"
 
 # Install build deps
 export ASSUME_ALWAYS_YES=yes
 pkg update
-pkg install \
-    gmake git bash rsync curl par2cmdline \
-    python2 python py27-tornado readline \
-    duplicity rdiff-backup rsnapshot
+
+case "$pyver" in
+    python2)
+        pkg install $common_pkgs python2 py27-tornado
+        ;;
+    python3)
+        pkg install $common_pkgs python3 py37-tornado
+        ;;
+    *)
+        usage 1>&2
+        exit 2
+        ;;
+esac