This was not being pushed from a testing MacBook so I'm adding it all at once. This is unfinished, still needs scripts to prep the working macOS env from which the live env is built. El Capitan code is likely to be dropped completely. Installing or compiling dependencies in brew is problematic at this point.
25 lines
450 B
Bash
Executable file
25 lines
450 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
## Init macOS env
|
|
|
|
# Set Locale
|
|
LC_ALL=en_US.UTF-8; export LC_ALL
|
|
LANG=en_US.UTF-8; export LANG
|
|
|
|
# Set PATH
|
|
for p in /usr{/local/opt/{e2fsprogs,ruby,util-linux},/local,}/{bin,sbin}; do
|
|
PATH="${p}:${PATH}"
|
|
done
|
|
export PATH
|
|
|
|
# Create and mount RAMDisk
|
|
if ! [ -d /Volumes/RAM_Disk ]; then
|
|
diskutil erasevolume HFS+ RAM_Disk $(hdiutil attach -nomount ram://524288)
|
|
fi
|
|
cd /Volumes/RAM_Disk
|
|
|
|
# Stay awake
|
|
caffeinate -id &
|
|
|
|
# Run cmd
|
|
"$1"
|