From ae4bbf924dd69a5a226ff5c7cf0a232097b7b036 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 14 Jun 2022 19:32:45 +0200 Subject: Cleanup in start.sh --- bwrap-files/start.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bwrap-files') diff --git a/bwrap-files/start.sh b/bwrap-files/start.sh index f0d0fa1..769eaea 100755 --- a/bwrap-files/start.sh +++ b/bwrap-files/start.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail -filesdir="$(dirname "$0")" +filesdir="$(realpath "$(dirname "$0")")" cd "$filesdir" ghcup_base=$(ghcup whereis basedir) @@ -9,7 +9,7 @@ ghcup_base=$(ghcup whereis basedir) chroot="${filesdir}/ubuntu-base" args=( - --tmpfs /tmp + --tmpfs / --ro-bind "${chroot}/bin" /bin --ro-bind "${chroot}/usr/bin" /usr/bin --ro-bind "${chroot}/usr/lib" /usr/lib @@ -22,9 +22,9 @@ args=( --ro-bind "${ghcup_base}/cache" "${ghcup_base}/cache" --ro-bind "${filesdir}/workdir" /workdir --setenv PATH "/bin:/usr/bin:${ghcup_base}/bin" - --setenv GHCUP_INSTALL_BASE_PREFIX "$(dirname ${ghcup_base})" + --setenv GHCUP_INSTALL_BASE_PREFIX "$(dirname "${ghcup_base}")" --proc /proc - --chdir "/tmp" + --chdir "/workdir" --new-session --unshare-all --die-with-parent -- cgit v1.2.3-70-g09d2