summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNæþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk>2016-02-15 10:36:31 +0000
committerNæþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk>2016-02-15 10:36:31 +0000
commite6e6fe3cd13aaecf83cf3105c3fcd81db97481b5 (patch)
tree062b1ab136418abdf3c92f9b0dffa66ed9b900b3
parent95090da408d106e2193d7d9f2db18520155c0191 (diff)
Added windows option 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"