aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2022-06-14 19:32:45 +0200
committerTom Smeding <tom@tomsmeding.com>2022-06-14 19:32:45 +0200
commitae4bbf924dd69a5a226ff5c7cf0a232097b7b036 (patch)
treec768b8ef22732b3c5fd9388cdf44f617aa84498b
parentaa6327c3f630c9b7b7ceef8d07f3a57ca03cccf1 (diff)
Cleanup in start.sh
-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