Created
February 13, 2010 16:58
-
-
Save patroza/303546 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'emp/arma/tools/common' | |
class Bla | |
include EMP::Arma::Tools | |
def wait | |
STDIN.gets | |
end | |
def run #your code goes in run | |
begin | |
$base_path = 'P:\x' | |
puts "\nJunctions:" | |
addjunc( 'acex', 'C:\unused' ) | |
puts "\nRestore P3D:" | |
recren( 'ace', '.b3d', '.p3d' ) | |
puts "\nPress enter when ready to rename P3D..." | |
wait | |
puts "\nRename P3D:" | |
recren( 'ace', '.p3d', '.b3d' ) | |
puts "\nJunctions:" | |
remjunc( 'acex' ) | |
rescue StandardError, Interrupt, Exception => msg | |
puts "Error" | |
puts msg | |
wait | |
end | |
end | |
end | |
obj = Bla.new | |
obj.run | |
puts "Done" | |
obj.wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment