summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xblaunits.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/blaunits.rb b/blaunits.rb
index 460df9a..b8b00c8 100755
--- a/blaunits.rb
+++ b/blaunits.rb
@@ -1,6 +1,7 @@
#!/usr/bin/ruby
-VERSION = "2.0"
+VERSION = "2.0.1"
+BINARY_NAME = "gunits"
begin
args = ARGV.dup
@@ -51,15 +52,15 @@ begin
puts "Invalid input! Try !convert [amount] [from-unit] to [to-unit] e.g !convert 2 cm to inches"
exit
end
- out = %x(gunits -t1 #{from} #{to})
+ out = %x(#{BINARY_NAME} -t1 #{from} #{to})
outs = out.split(" ")
if outs[0] == "Unknown"
from.upcase!
- out = %x(gunits -t1 #{from} #{to})
+ out = %x(#{BINARY_NAME} -t1 #{from} #{to})
outs = out.split(" ")
if outs[0] == "Unknown"
to.upcase!
- out = %x(gunits -t1 #{from} #{to})
+ out = %x(#{BINARY_NAME} -t1 #{from} #{to})
outs = out.split(" ")
if outs[0] == "Unknown"
puts out