diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-12 16:19:20 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-12 16:19:20 -0700 |
commit | a29f4c3421cd8deb2b0f578acb195442569236b7 (patch) | |
tree | b06361fac5ae74630187c55c4174e8011256b398 /scripts/mount.sh | |
parent | c55326b0cb6994bb802cf6aac4a296acfb0e41ff (diff) | |
parent | ed69c917c47435007ad72dc83a2db31c19699846 (diff) |
Merge branch 'lukeshu/build-sys'
Diffstat (limited to 'scripts/mount.sh')
-rwxr-xr-x | scripts/mount.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/mount.sh b/scripts/mount.sh index f75f403..bf84163 100755 --- a/scripts/mount.sh +++ b/scripts/mount.sh @@ -1,14 +1,20 @@ #!/bin/bash +readonly image=../scratch/dump-zero.img + +###################################################################### + set -e set -x -go build ./cmd/btrfs-rec +make build -mkdir -p ../scratch/dump-zero.mnt +gendir="${image%.img}.gen" +mountpoint="${image%.img}.mnt" +mkdir -p "$mountpoint" -sudo ./btrfs-rec \ - --pv ../scratch/dump-zero.img \ - --mappings=../scratch/dump-zero.gen/2.mappings.json \ +sudo ./bin/btrfs-rec \ + --pv="$image" + --mappings="$gendir/2.mappings.json" \ inspect mount \ --skip-filesums \ - ../scratch/dump-zero.mnt + "$mountpoint" |