summaryrefslogtreecommitdiff
path: root/costvm
diff options
context:
space:
mode:
Diffstat (limited to 'costvm')
-rwxr-xr-xcostvm5
1 files changed, 4 insertions, 1 deletions
diff --git a/costvm b/costvm
index a00a229..895a4bf 100755
--- a/costvm
+++ b/costvm
@@ -2,13 +2,14 @@
# encoding: utf-8
if ARGV.length == 0 then
- puts "Usage: costvm CORES MEMORY DISKS"
+ puts "Usage: costvm CORES MEMORY DISKS [windows]"
exit
end
CORES = ARGV.shift.chomp.to_i
MEM = ARGV.shift.chomp.to_i
DISKS = ARGV.shift.chomp.split(',')
+WINDOWS = !ARGV.shift.nil?
if CORES > 16 then
puts "Invalid machine. Too many cores: #{CORES}."
@@ -65,4 +66,6 @@ DISKS.each do |disk|
end
end
+cost += MEM if WINDOWS
+
puts "Machine cost: £#{cost}.00"