Skip to content

Commit

Permalink
tool/zsh/mkofs: doas
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Dee (Jōshin) committed Jan 14, 2025
1 parent 102edf4 commit 9f6bf6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tool/zsh/mkofs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9f6bf6e

Please sign in to comment.