diff options
Diffstat (limited to 'lib/byteback/util.rb')
-rw-r--r-- | lib/byteback/util.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/byteback/util.rb b/lib/byteback/util.rb index 9a993d6..d70888b 100644 --- a/lib/byteback/util.rb +++ b/lib/byteback/util.rb @@ -66,5 +66,13 @@ module Byteback pid2, status = Process.waitpid2(pid, 0) status.exitstatus end + + def btrfs_bin + %w(/bin/btrfs /sbin/btrfs).each do |path| + return path if File.executable?(path) + end + raise Errno::ENOENT, 'btrfs' + end + end end |