Skip to content

Commit 6c2e1bf

Browse files
probonopdTheAssassin
authored andcommitted
POSIX sh for this script
1 parent 2041ab4 commit 6c2e1bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

chroot/chroot_build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#! /bin/sh
22

33
set -ex
44

@@ -14,11 +14,13 @@ fi
1414
tempdir="$(mktemp -d)"
1515

1616
# 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]}")")"/..
17+
repo_root_dir=$(dirname "$(readlink -f "$0")")/../
1818

1919
# cleanup takes care of unmounting and removing all downloaded files
2020
cleanup() {
21-
sudo umount "$tempdir"/miniroot/{dev,proc,sys}
21+
for i in dev proc sys; do
22+
sudo umount "$tempdir"/miniroot/"$i"
23+
done
2224
sudo rm -rf "$tempdir"
2325
}
2426
trap cleanup EXIT

0 commit comments

Comments
 (0)