diff options
Diffstat (limited to 'config/install.sh')
| -rw-r--r-- | config/install.sh | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/config/install.sh b/config/install.sh index 0de9b1c..8d555c4 100644 --- a/config/install.sh +++ b/config/install.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -euo pipefail +set -exuo pipefail export DEBIAN_FRONTEND=noninteractive @@ -75,17 +75,8 @@ apt-get install -y --no-install-recommends \ zstd echo -e "section_end:$(date +%s):install_packages\r\e[0K" -echo -e "section_start:$(date +%s):install_dotnet\r\e[0K==> Installing dotnet/mono…" -wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.asc.gpg -wget -q -O /etc/apt/sources.list.d/microsoft-prod.list https://packages.microsoft.com/config/debian/10/prod.list -apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF -echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list - -curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -echo -e "section_end:$(date +%s):install_dotnet\r\e[0K" - echo -e "section_start:$(date +%s):install_asdf\r\e[0K==> Installing asdf…" -dpkg --install "$(find /opt/toolcache/ -name "license-management*.deb")" +dpkg --install /opt/toolcache/license*.deb rm -fr /root ln -s /opt/gitlab /root @@ -113,6 +104,17 @@ done wait echo -e "section_end:$(date +%s):install_asdf\r\e[0K" +echo -e "section_start:$(date +%s):install_dotnet\r\e[0K==> Installing dotnet/mono…" +wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.asc.gpg +wget -q -O /etc/apt/sources.list.d/microsoft-prod.list https://packages.microsoft.com/config/debian/10/prod.list +apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list + +curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe +curl -o /tmp/dotnet-install.sh https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.sh +bash /tmp/dotnet-install.sh --install-dir /opt/asdf/installs/dotnet/latest --channel LTS --version latest +echo -e "section_end:$(date +%s):install_dotnet\r\e[0K" + echo -e "section_start:$(date +%s):cleanup\r\e[0K==> Beginning cleanup…" apt purge -y libx11-6 libwayland-client0 apt autoremove -y @@ -180,15 +182,35 @@ zstd_command="/usr/bin/zstd -19 -T0" cd /opt tar --use-compress-program "$zstd_command" -cf /opt/asdf.tar.zst asdf & -cd /usr/lib -tar --use-compress-program "$zstd_command" -cf /usr/lib/gcc.tar.zst gcc & +cd /opt/gitlab +tar --use-compress-program "$zstd_command" -cf /opt/gitlab/.cache.tar.zst .cache & +tar --use-compress-program "$zstd_command" -cf /opt/gitlab/.config.tar.zst .config & +tar --use-compress-program "$zstd_command" -cf /opt/gitlab/.m2.tar.zst .m2 & +tar --use-compress-program "$zstd_command" -cf /opt/gitlab/embedded.tar.zst embedded & + +cd /usr +tar --use-compress-program "$zstd_command" -cf /usr/include.tar.zst include & cd /usr/lib +tar --use-compress-program "$zstd_command" -cf /usr/lib/elixir.tar.zst elixir & +tar --use-compress-program "$zstd_command" -cf /usr/lib/erlang.tar.zst erlang & +tar --use-compress-program "$zstd_command" -cf /usr/lib/gcc.tar.zst gcc & +tar --use-compress-program "$zstd_command" -cf /usr/lib/git-core.tar.zst git-core & +tar --use-compress-program "$zstd_command" -cf /usr/lib/llvm-7.tar.zst llvm-7 & tar --use-compress-program "$zstd_command" -cf /usr/lib/rustlib.tar.zst rustlib & wait rm -fr \ /opt/asdf/ \ + /opt/gitlab/.m2 \ + /opt/gitlab/.cache \ + /opt/gitlab/.config \ + /opt/gitlab/embedded \ + /usr/include \ + /usr/lib/elixir \ + /usr/lib/erlang \ /usr/lib/gcc \ + /usr/lib/git-core \ + /usr/lib/llvm-7 \ /usr/lib/rustlib echo -e "section_end:$(date +%s):compress_files\r\e[0K" |
