1- require "cocaine "
1+ require "terrapin "
22require "find"
33require "colorize"
44require "./src/extraction"
@@ -52,13 +52,13 @@ def self.run file
5252 uefibins = Find . find ( "." ) . reject { |e | File . directory? e } . select { |e | e . end_with? ".bin" }
5353 puts "got #{ uefibins . length } modules" . colorize ( :blue )
5454 puts "finding vbios" . colorize ( :blue )
55- line = Cocaine ::CommandLine . new ( "file" , "-b :file" )
55+ line = Terrapin ::CommandLine . new ( "file" , "-b :file" )
5656 modules = uefibins . select { |e | line . run ( file : e ) . include? "Video" }
5757 if modules . length > 0
5858 puts "#{ modules . length } possible candidates" . colorize ( :green )
5959 if Utils ::installed? ( "rom-parser" , "required for proper rom naming & higher accuracy" )
6060 modules . each do |mod |
61- rom_parser = Cocaine ::CommandLine . new ( "rom-parser" , ":file" )
61+ rom_parser = Terrapin ::CommandLine . new ( "rom-parser" , ":file" )
6262 begin
6363 romdata = rom_parser . run ( file : mod )
6464 romdata = romdata . split ( "\n " ) [ 1 ] . split ( ", " ) . map { |e | e . split ( ": " ) } . to_h rescue nil
@@ -67,7 +67,7 @@ def self.run file
6767 new_filename = "vbios_#{ romdata [ 'vendor' ] } _#{ romdata [ 'device' ] } .rom"
6868 FileUtils . cp ( mod , "#{ outpath } /#{ new_filename } " )
6969 end
70- rescue Cocaine ::ExitStatusError => e
70+ rescue Terrapin ::ExitStatusError => e
7171 puts "can't determine vbios type of #{ File . basename ( mod ) } , saving as 'vbios_unknown_#{ File . basename ( mod ) } '"
7272 FileUtils . cp ( mod , "#{ outpath } /vbios_unknown_#{ File . basename ( mod ) } " )
7373 end
0 commit comments