12 lines
No EOL
269 B
Bash
Executable file
12 lines
No EOL
269 B
Bash
Executable file
#! /bin/bash
|
|
|
|
CWD=$(cd -P . && pwd)
|
|
readarray -t TMPFS_DIRS < <(df -lt tmpfs --output=target | tail -n +2)
|
|
|
|
|
|
if [[ " ${TMPFS_DIRS[*]} " =~ " ${CWD}/build " ]]; then
|
|
echo "build alread a tmpfs"
|
|
else
|
|
echo "Mounting build as tmpfs"
|
|
sudo mount -m -t tmpfs tmpfs build
|
|
fi |