This commit is contained in:
Zsolt Ero
2023-12-15 03:47:46 +01:00
parent 578f81d320
commit 71d7d7fe95
16 changed files with 135 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
sudo umount mnt || true
rm -rf mnt
sudo umount mnt_rw || true
rm -rf mnt_rw
rm -f image.btrfs
@@ -16,21 +16,21 @@ mkfs.btrfs -v \
# https://btrfs.readthedocs.io/en/latest/btrfs-man5.html#mount-options
# compression doesn't make sense, data is already gzip compressed
mkdir -p mnt
mkdir -p mnt_rw
sudo mount -v \
-t btrfs \
-o noacl,nobarrier,noatime,max_inline=4096 \
image.btrfs mnt
image.btrfs mnt_rw
sudo chown ofm:ofm -R mnt
sudo chown ofm:ofm -R mnt_rw
../../tile_gen/venv/bin/python ../../tile_gen/extract.py output.mbtiles mnt/extract \
../../tile_gen/venv/bin/python ../../tile_gen/extract.py output.mbtiles mnt_rw/extract \
> "extract_out.log" 2> "extract_err.log"
sudo umount mnt
sudo umount mnt_rw
../../tile_gen/venv/bin/python ../../tile_gen/shrink_btrfs.py image.btrfs
# pigz -k image.btrfs --fast