This website requires JavaScript.
Explore
Help
Sign In
alex
/
bcachefs-tools
Watch
1
Star
0
Fork
0
You've already forked bcachefs-tools
mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced
2025-01-23 00:07:07 +03:00
Code
Issues
Actions
Packages
Projects
Releases
Wiki
Activity
1c0c62559f
bcachefs-tools
/
mkfs.bcachefs
5 lines
95 B
Plaintext
Raw
Normal View
History
Unescape
Escape
make: correct path to 'bcachefs' in mkfs/fsck scripts The fsck and bcachefs scripts simply worked by running 'exec bcachefs ...', but this executes whatever is out of `$PATH`, which is likely not what a user expected when working inside the bcachefs-tools tree. This replaces the local uses of 'exec bcachefs' to use bash's readlink/dirname builtins in order to find the location of the currently executing wrapper, and execute the 'bcachefs' tool from there. This allows executing these wrappers from anywhere, provided 'bcachefs' is just right next to them, with the correct semantics. As a result, this also allows removing a tiny hack from the Nix expressions, allowing the included default.nix to use completely standard mkDerivation builders, with no extra patch/fixup phases. Signed-off-by: Austin Seipp <aseipp@pobox.com>
2017-12-16 02:39:12 +03:00
#!/usr/bin/env bash
Rename from bcache-tools to bcachefs-tools
2017-03-20 02:56:34 +03:00
make: correct path to 'bcachefs' in mkfs/fsck scripts The fsck and bcachefs scripts simply worked by running 'exec bcachefs ...', but this executes whatever is out of `$PATH`, which is likely not what a user expected when working inside the bcachefs-tools tree. This replaces the local uses of 'exec bcachefs' to use bash's readlink/dirname builtins in order to find the location of the currently executing wrapper, and execute the 'bcachefs' tool from there. This allows executing these wrappers from anywhere, provided 'bcachefs' is just right next to them, with the correct semantics. As a result, this also allows removing a tiny hack from the Nix expressions, allowing the included default.nix to use completely standard mkDerivation builders, with no extra patch/fixup phases. Signed-off-by: Austin Seipp <aseipp@pobox.com>
2017-12-16 02:39:12 +03:00
SDIR="$(dirname "$(readlink -f "$0")")"
exec "$SDIR/bcachefs" format "$@"
Reference in New Issue
Copy Permalink