tool/zsh/mkofs: doas

This commit is contained in:
Steven Dee (Jōshin) 2025-01-13 16:48:55 -08:00
parent 102edf4ea2
commit 9f6bf6ea71
No known key found for this signature in database

View file

@ -17,7 +17,12 @@ cut -d' ' -f2 /proc/mounts | while read -r line; do
return 0
fi
done
if whence doas >/dev/null; then
doas=doas
else
doas=sudo
fi
( set -x
sudo mount -t tmpfs -o size=10G,noatime,nodiratime /dev/shm "$o"
$doas mount -t tmpfs -o size=10G,noatime,nodiratime /dev/shm "$o"
)
# vim:ft=zsh