| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. -e |
| 2 | |
| 3 | if testscip-shell system . . test. -x /usr/bin/dnfscip-shell filesystem . . `/usr/bin/dnf`.; then |
| 4 | echoscip-shell system . . echo. Installing prerequisites via dnf... |
| 5 | dnf -y install epel-release |
| 6 | dnf -y install zlib-devel bzip2-devel xz-devel curl-devel openssl-devel samtools bcftools htslib-tools |
| 7 | |
| 8 | elif testscip-shell system . . test. -x /usr/bin/yumscip-shell filesystem . . `/usr/bin/yum`.; then |
| 9 | if yum -y install epel-release; then |
| 10 | echoscip-shell system . . echo. Installing prerequisites via yum... |
| 11 | yum -y install zlib-devel bzip2-devel xz-devel curl-devel openssl-devel samtools bcftools htslib-tools |
| 12 | else |
| 13 | echoscip-shell system . . echo. Installing non-test prerequisites via yum... |
| 14 | yum -y install zlib-devel bzip2-devel xz-devel curl-devel openssl-devel |
| 15 | emulate=yes |
| 16 | fi |
| 17 | |
| 18 | elif testscip-shell system . . test. -d /etc/dpkgscip-shell filesystem . . `/etc/dpkg`.; then |
| 19 | echoscip-shell system . . echo. Installing prerequisites via apt-get... |
| 20 | apt-getscip-shell system . . apt-get. update |
| 21 | apt-getscip-shell system . . apt-get. install -y --no-install-recommends --no-install-suggests libcurl4-openssl-dev libssl-dev zlib1g-dev libbz2-dev liblzma-dev samtools bcftools tabix |
| 22 | |
| 23 | elif testscip-shell system . . test. -x /sbin/apkscip-shell filesystem . . `/sbin/apk`.; then |
| 24 | echoscip-shell system . . echo. Installing non-test prerequisites via apk... |
| 25 | apk update |
| 26 | apk add zlib-dev bzip2-dev xz-dev curl-dev openssl-dev |
| 27 | emulate=yes |
| 28 | |
| 29 | elif testscip-shell system . . test. -x ${HOMEBREW_PREFIX-/usr/local}/bin/brew; then |
| 30 | echoscip-shell system . . echo. Installing prerequisites via brew... |
| 31 | HOMEBREW_NO_AUTO_UPDATE=1 brew install -q samtools bcftools |
| 32 | brew unlink xz || truescip-shell system . . true. |
| 33 | |
| 34 | else |
| 35 | echoscip-shell system . . echo. No package manager detected |
| 36 | fi |
| 37 | |
| 38 | if testscip-shell system . . test. -n "$emulate" && testscip-shell system . . test. $# -ge 2; then |
| 39 | emulator=$1 |
| 40 | bindir=$2 |
| 41 | echoscip-shell system . . echo. Creating symlinks to $emulator in $bindir... |
| 42 | mkdirscip-shell system . . mkdir. -p $bindir |
| 43 | lnscip-shell system . . ln. -s $emulator $bindir/samtools |
| 44 | lnscip-shell system . . ln. -s $emulator $bindir/bcftools |
| 45 | lnscip-shell system . . ln. -s $emulator $bindir/bgzip |
| 46 | lnscip-shell system . . ln. -s $emulator $bindir/tabix |
| 47 | fi |