aboutsummaryrefslogtreecommitdiff
path: root/bwrap-files
diff options
context:
space:
mode:
Diffstat (limited to 'bwrap-files')
-rwxr-xr-xbwrap-files/start.sh8
1 files changed, 4 insertions, 4 deletions
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