We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2041ab4 commit 6c2e1bfCopy full SHA for 6c2e1bf
chroot/chroot_build.sh
@@ -1,4 +1,4 @@
1
-#! /bin/bash
+#! /bin/sh
2
3
set -ex
4
@@ -14,11 +14,13 @@ fi
14
tempdir="$(mktemp -d)"
15
16
# need to memorize the repository root directory's path so that we can copy files from it
17
-repo_root_dir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"/..
+repo_root_dir=$(dirname "$(readlink -f "$0")")/../
18
19
# cleanup takes care of unmounting and removing all downloaded files
20
cleanup() {
21
- sudo umount "$tempdir"/miniroot/{dev,proc,sys}
+ for i in dev proc sys; do
22
+ sudo umount "$tempdir"/miniroot/"$i"
23
+ done
24
sudo rm -rf "$tempdir"
25
}
26
trap cleanup EXIT
0 commit comments