summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-07-15 12:28:52 -0600
committermo khan <mo.khan@gmail.com>2020-07-16 20:03:40 -0600
commit2bef4d83886ea13f3dc45a5bb16b997a6eae1acd (patch)
tree84fbb2bcb8b978676a0b91bc10d4fcc18dbee4e3 /config
parente6e1644f777da7178d90c3cbf8043a410476fec3 (diff)
Install dotnet SDK
* Include the latest dotnet SDK in the /opt/asdf/installs directory. * Update CHANGELOG and bump version * Compress large directories
Diffstat (limited to 'config')
-rw-r--r--config/files/.bashrc9
-rw-r--r--config/install.sh46
2 files changed, 43 insertions, 12 deletions
diff --git a/config/files/.bashrc b/config/files/.bashrc
index 81afcb8..388f93d 100644
--- a/config/files/.bashrc
+++ b/config/files/.bashrc
@@ -60,7 +60,16 @@ function enable_dev_mode() {
}
inflate /opt/asdf.tar.zst /opt
+inflate /opt/gitlab/.cache.tar.zst /opt/gitlab
+inflate /opt/gitlab/.config.tar.zst /opt/gitlab
+inflate /opt/gitlab/.m2.tar.zst /opt/gitlab
+inflate /opt/gitlab/embedded.tar.zst /opt/gitlab
+inflate /usr/include.tar.zst /usr
+inflate /usr/lib/elixir.tar.zst /usr/lib
+inflate /usr/lib/erlang.tar.zst /usr/lib
inflate /usr/lib/gcc.tar.zst /usr/lib
+inflate /usr/lib/git-core.tar.zst /usr/lib
+inflate /usr/lib/llvm-7.tar.zst /usr/lib
inflate /usr/lib/rustlib.tar.zst /usr/lib
# shellcheck source=/dev/null
diff --git a/config/install.sh b/config/install.sh
index 0de9b1c..834dff8 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,15 +75,6 @@ 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")"
rm -fr /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"