summaryrefslogtreecommitdiff
path: root/scripts/main.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-07-13 23:45:14 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2022-07-14 00:50:23 -0600
commit913acf193bfac666cec68e8c3fb13829a7a0c794 (patch)
tree9e26b25fa2ed2b966f256b0580c17c9291c29ba6 /scripts/main.sh
parentb8c5940165399f9dc404c912aa455822347bb367 (diff)
implement scan-for-nodes command
Diffstat (limited to 'scripts/main.sh')
-rwxr-xr-xscripts/main.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/main.sh b/scripts/main.sh
new file mode 100755
index 0000000..e8d006d
--- /dev/null
+++ b/scripts/main.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -e
+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 ||
+ { r=$?; rm -f ../scratch/dump.scan-for-nodes.json; exit $r; }
+fi