Add new entry blog: Web Infra 1 (#3)
* 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
This commit is contained in:
parent
bb2fd54e41
commit
6fdcf4f102
10 changed files with 41 additions and 37 deletions
17
scripts/tmpfs_dirs.sh
Executable file
17
scripts/tmpfs_dirs.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#! /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
|
||||
Loading…
Add table
Add a link
Reference in a new issue