From 3b1fffade1473f20f2558733fbd218f4580fc7c3 Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Tue, 22 Aug 2017 00:05:20 -0700 Subject: Initial public commit --- misc/mac-tmp-disk-mount.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 misc/mac-tmp-disk-mount.sh (limited to 'misc/mac-tmp-disk-mount.sh') diff --git a/misc/mac-tmp-disk-mount.sh b/misc/mac-tmp-disk-mount.sh new file mode 100755 index 000000000..f752c54f6 --- /dev/null +++ b/misc/mac-tmp-disk-mount.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e +cd "$(dirname "$0")/.." + +# Create if needed +if [[ ! -f build/tmp.sparseimage ]]; then + echo "Creating sparse disk image with case-sensitive file system build/tmp.sparseimage" + mkdir -p build + hdiutil create build/tmp.sparseimage \ + -size 1g \ + -type SPARSE \ + -fs JHFS+X \ + -volname tmp +fi + +# Mount if needed +if ! (diskutil info build/tmp >/dev/null); then + echo "Mounting sparse disk image with case-sensitive file system at build/tmp" + hdiutil attach build/tmp.sparseimage \ + -readwrite \ + -mountpoint "$(pwd)/build/tmp" \ + -nobrowse \ + -noautoopen \ + -noidmereveal +fi -- cgit v1.2.3