#!/bin/bash

version=1.26.24
version2=1.26.24
version3=1.26.29

case $(get_codename) in
bionic)
  install_packages https://github.com/Pi-Apps-Coders/files/releases/download/large-files/veracrypt-1.25.9-Ubuntu-18.04-arm64.deb || exit 1
  ;;
focal|jammy|noble)
  ubuntu_ppa_installer "unit193/encryption"
  install_packages veracrypt || exit 1
  ;;
buster)
  install_packages https://github.com/veracrypt/VeraCrypt/releases/download/VeraCrypt_1.26.7/veracrypt-1.26.7-Debian-10-arm64.deb || exit 1
  ;;
bullseye)
  install_packages https://github.com/veracrypt/VeraCrypt/releases/download/VeraCrypt_${version}/veracrypt-${version}-Debian-11-arm64.deb || exit 1
  ;;
bookworm)
  install_packages https://github.com/veracrypt/VeraCrypt/releases/download/VeraCrypt_${version2}/veracrypt-${version2}-Debian-12-arm64.deb || exit 1
  ;;
trixie)
  install_packages https://github.com/veracrypt/VeraCrypt/releases/download/VeraCrypt_${version3}/veracrypt-${version3}-Debian-13-arm64.deb || exit 1
  ;;
*)
  error "User error: VeraCrypt is not available for your operating system release"
  ;;
esac
