osm-map-js/scripts/tmpfs_dirs.sh
2025-09-13 03:41:49 +09:00

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