blob: a9afde33046c27951eeb45d161d54eac400b3d2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/bin/bash
set -ex
go build ./cmd/btrfs-rec
if ! test -s ../scratch/dump.scan-for-nodes.json; then
time ./btrfs-rec --pv=../scratch/dump-zero.img inspect scan-for-nodes > ../scratch/dump.scan-for-nodes.json
fi
if ! test -s ../scratch/dump.rebuilt-mappings.json; then
time ./btrfs-rec --pv=../scratch/dump-zero.img inspect rebuild-mappings ../scratch/dump.scan-for-nodes.json \
> ../scratch/dump.rebuilt-mappings.json \
2> >(tee >&2 ../scratch/dump.rebuilt-mappings.log)
fi
|