Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'fileutils'
- lwjgl = File.expand_path(ARGV[0])
- update = File.expand_path(ARGV[1])
- if !File.directory?(lwjgl) || !File.directory?(update)
- abort("updatelwjgl.rb [FTB_Mod_Pack] [lwjgl]")
- end
- have = Dir.glob([
- "#{lwjgl}/jar/*.jar",
- "#{lwjgl}/native/linux/*.so",
- "#{lwjgl}/native/windows/*.dll"
- ])
- replace = Dir.glob([
- "#{update}/minecraft/bin/*.jar",
- "#{update}/minecraft/bin/*.{so,dll}",
- "#{update}/minecraft/bin/natives/*.{so,dll}"
- ])
- replace.each { |f|
- n = have.find { |h| File.basename(h) == File.basename(f) }
- if n
- puts "#{n} -> #{f}"
- FileUtils.cp(n, f)
- end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement