* Change blog entry style : titles font weight lighter->normal * Add tmpfs scripts for linux (dev only) Co-authored-by: Corentin <corentin-pro@mail.com> Co-authored-by: Jimmy Vargo <james@ayo.tokyo> Reviewed-on: ayo/website#3
17 lines
No EOL
350 B
Bash
Executable file
17 lines
No EOL
350 B
Bash
Executable file
#! /bin/bash
|
|
|
|
if [[ $(uname) != "Linux" ]]; then
|
|
echo "Not on Linux : no tmpfs"
|
|
exit
|
|
fi
|
|
|
|
CWD=$(cd -P . && pwd)
|
|
readarray -t TMPFS_DIRS < <(df -lt tmpfs --output=target | tail -n +2)
|
|
|
|
|
|
if [[ " ${TMPFS_DIRS[*]} " =~ " ${CWD}/public " ]]; then
|
|
echo "public alread a tmpfs"
|
|
else
|
|
echo "Mounting public as tmpfs"
|
|
sudo mount -m -t tmpfs tmpfs public
|
|
fi |