install-singularity.sh 509 B

1234567891011
  1. #!/bin/bash
  2. set -e -u
  3. release="$(curl -fsSL https://api.github.com/repos/sylabs/singularity/releases/latest | jq -r .tag_name)"
  4. [ "${release}x" = "x" ] && echo "Failed to get latest singularity release name" && exit 1 || true
  5. codename="$(lsb_release -cs)"
  6. arch="$(dpkg --print-architecture)"
  7. wget -q -O /tmp/singularity-ce.deb https://github.com/sylabs/singularity/releases/download/$release/singularity-ce_${release#v}-${codename}_$arch.deb
  8. sudo dpkg -i /tmp/singularity-ce.deb
  9. sudo apt-get install -qq -f