mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
sync.sh: Add "-f" option to forcibly regenerate _fs_contents from scratch.
This might be useful e.g if something goes wrong with the filesystem.
This commit is contained in:
parent
f137881147
commit
c4bb9a3ccb
1 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "-f" ]; then
|
||||
rm -vf _fs_contents
|
||||
fi
|
||||
|
||||
if [ $(id -u) != 0 ]; then
|
||||
echo "This needs to be run as root"
|
||||
exit
|
||||
|
@ -11,6 +17,7 @@ if [ ! -f _fs_contents ]; then
|
|||
fi
|
||||
|
||||
mke2fs -F -I 128 _fs_contents
|
||||
|
||||
chown 1000:1000 _fs_contents
|
||||
mkdir -vp mnt
|
||||
mount -o loop _fs_contents mnt/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue