<commit_before>module Frachtraum
  
  REQUIRED_TOOLS_BSD   = ['dd','gpart','glabel','geli','zfs','zpool']
  
  
  def attach_bsd(password, depot=nil)
    
    # if we provided a specific depot, run procedure only on that one
    depots = depot.nil? ? DEPOTS : [ depot ]
    
    # first of all, decrypt and mount all depots
    depots.each do |depot|      
      print "decrypting /dev/label/#{depot}..."
      
      output = %x( echo #{password} | geli attach -d -j - /dev/label/#{depot} 2>&1 )
      if $?.success? 
        output = %x( zfs mount #{depot} 2>&1 )
        if $?.success? then puts "DONE"
        else puts "FAILED! --> #{output}" end
      else 
        puts "FAILED! --> #{output}" 
      end
    end # each
    
    # mount timemachine targets as well
    TIMEMACHINE_TARGETS.each do |tmtarget|
      print "mounting timemachine target #{tmtarget}..."<commit_msg>well, we need grep too<commit_after>module Frachtraum
  
  REQUIRED_TOOLS_BSD   = ['dd','grep','gpart','glabel','geli','zfs','zpool']
  
  
  def attach_bsd(password, depot=nil)
    
    # if we provided a specific depot, run procedure only on that one
    depots = depot.nil? ? DEPOTS : [ depot ]
    
    # first of all, decrypt and mount all depots
    depots.each do |depot|      
      print "decrypting /dev/label/#{depot}..."
      
      output = %x( echo #{password} | geli attach -d -j - /dev/label/#{depot} 2>&1 )
      if $?.success? 
        output = %x( zfs mount #{depot} 2>&1 )
        if $?.success? then puts "DONE"
        else puts "FAILED! --> #{output}" end
      else 
        puts "FAILED! --> #{output}" 
      end
    end # each
    
    # mount timemachine targets as well
    TIMEMACHINE_TARGETS.each do |tmtarget|
      print "mounting timemachine target #{tmtarget}..."
{'fraction_non_alphanumeric': 0.13804713804713806, 'fraction_numerical': 0.004489337822671156, 'mean_word_length': 2.2957486136783736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2603147', 'n_tokens_mistral': 626, 'n_tokens_neox': 610, 'n_words': 173}