summaryrefslogtreecommitdiff
path: root/lib/byteback/util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/byteback/util.rb')
-rw-r--r--lib/byteback/util.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/byteback/util.rb b/lib/byteback/util.rb
index 9a993d6..ebf5ca5 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.exist?(path)
+ end
+ raise Errno::ENOENT, 'btrfs'
+ end
+
end
end