Guest User

Installation Script

a guest
Jul 23rd, 2020
29
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. echo "About to install a bunch of packages..."
  4.  
  5. # This is commented out because otherwise it would take forever to run and check
  6. # if things failed... Uncomment once we have the ability to see that gcc-9 is
  7. # installed.
  8. # # Strangely enough, in this version, it's just 'nlohmann-json-dev' (not json3)
  9. packages=("nlohmann-json-dev"
  10.           "nlohmann-json3-dev" "libsdl2-dev" "libsdl2-image-dev"
  11.           "libsdl2-mixer-dev"
  12.           "gitlab-runner"
  13.           "zlib" "zlib-dev" "tree"
  14.           "zlibc"
  15.           "libpng-dev" "libpng-tools"
  16.           "libpng16-16" "libpng++-dev"
  17.           "libstdc++6")
  18.  
  19. apt-get update
  20. for package in ${packages[@]};
  21. do
  22.     apt-get --yes install $package
  23. done
  24.  
  25. apt-get --yes install software-properties-common
  26. add-apt-repository ppa:ubuntu-toolchain-r/test
  27. apt update
  28. apt-get install --yes build-essential
  29. apt-get --yes install gcc-9
  30. apt-get --yes install g++-9
  31.  
  32. update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
  33.  
  34. gcc --version
  35. g++ --version
  36.  
  37. # Same here... Uncomment once we fix the gcc-9 issue.
  38. #
  39. #
  40. # semidef, I'd do something like https://pastebin.com/8FFRg77V   to create an
  41. # image for your build environment
  42. #
  43. #
  44. # then for your project, assuming gitlab-runner is using the docker-executor,
  45. # just have 'image: host/ns/myimage' so it fires up your env to run the pipeline
  46. # in
  47. #
  48. # otherwise you're building that env from scratch every single time the pipeline
  49. # runs.  and if the pipeline is in two stages, you do that twice.  a whole lot
  50. # of time spent watching the blue spinny
  51. # # Packages needed to install meson
  52. meson_packages=("python3" " python3-pip" " python3-setuptools"
  53.                 "python3-wheel" "ninja-build")
  54.  
  55. for package in ${meson_packages[@]};
  56. do
  57.     apt-get --yes  install $package
  58. done
  59. pip3 install meson
  60. apt-get install meson
  61.  
  62. gcc --version
  63. g++ --version
  64.  
  65. apt-cache search "libpng"
RAW Paste Data