clean-install.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/usr/bin/env bash
  2. DISTRO="$1"
  3. VERSION="$2"
  4. BuildBase="$(cd "$(dirname "$0")" && cd .. && pwd)"
  5. # This is temporary - not all of the package-builder images from the helper-images repo
  6. # are available on Docker Hub. When everything falls under the "happy case" below this
  7. # can be deleted in a future iteration. This is written in a weird way for portability,
  8. # can't rely on bash 4.0+ to allow case fall-through with ;&
  9. if cat <<HAPPY_CASE | grep "$DISTRO-$VERSION"
  10. opensuse-15.1
  11. fedora-29
  12. debian-9
  13. debian-8
  14. fedora-30
  15. opensuse-15.0
  16. ubuntu-19.04
  17. centos-7
  18. fedora-31
  19. ubuntu-16.04
  20. ubuntu-18.04
  21. ubuntu-19.10
  22. debian-10
  23. centos-8
  24. ubuntu-1804
  25. ubuntu-1904
  26. ubuntu-1910
  27. debian-stretch
  28. debian-jessie
  29. debian-buster
  30. HAPPY_CASE
  31. then
  32. docker build -f "$BuildBase/clean-install.Dockerfile" -t "${DISTRO}_${VERSION}_dev" "$BuildBase/.." \
  33. --build-arg "DISTRO=$DISTRO" --build-arg "VERSION=$VERSION" \
  34. --build-arg EXTRA_CFLAGS="-DACLK_SSL_ALLOW_SELF_SIGNED"
  35. else
  36. case "$DISTRO-$VERSION" in
  37. arch-current)
  38. docker build -f "$BuildBase/clean-install-arch.Dockerfile" -t "${DISTRO}_${VERSION}_dev" "$BuildBase/.." \
  39. --build-arg "DISTRO=$DISTRO" --build-arg "VERSION=$VERSION" \
  40. --build-arg EXTRA_CFLAGS="-DACLK_SSL_ALLOW_SELF_SIGNED" # --no-cache
  41. ;;
  42. arch-extras) # Add valgrind to the container
  43. docker build -f "$BuildBase/clean-install-arch-extras.Dockerfile" -t "${DISTRO}_${VERSION}_dev" "$BuildBase/.." \
  44. --build-arg "DISTRO=$DISTRO" --build-arg "VERSION=$VERSION" \
  45. --build-arg EXTRA_CFLAGS="-DACLK_SSL_ALLOW_SELF_SIGNED" # --no-cache
  46. ;;
  47. *)
  48. echo "Unknown $DISTRO-$VERSION"
  49. ;;
  50. esac
  51. fi