]> arthur.barton.de Git - bup.git/blob - dev/prep-for-debianish-build
test-restore-map-owner: accommodate python 3 and test there
[bup.git] / dev / prep-for-debianish-build
1 #!/usr/bin/env bash
2
3 set -exuo pipefail
4
5 usage()
6 {
7     echo "Usage: prep-for-debianish-build [python2|python3] [pyxattr|xattr]"
8 }
9
10 export DEBIAN_FRONTEND=noninteractive
11 apt-get update
12
13 common_debs='gcc make linux-libc-dev git rsync eatmydata acl attr par2'
14 common_debs="$common_debs duplicity rdiff-backup rsnapshot dosfstools kmod"
15
16 pyver="${1:-python2}"
17 xattr="${2:-pyxattr}"
18
19 # dosfstools: for vfat for the (root) tests
20
21 case "$pyver" in
22     python2)
23         apt-get install -y \
24                 $common_debs \
25                 python2.7-dev python-fuse \
26                 python-"$xattr" python-pylibacl python-tornado
27         ;;
28     python3)
29         apt-get install -y \
30                 $common_debs \
31                 python3.7-dev python3-distutils python3-fuse \
32                 python3-"$xattr" python3-pylibacl python3-tornado
33         ;;
34     *)
35         usage 1>&2
36         exit 2
37         ;;
38 esac