diff options
author | Næþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk> | 2016-02-15 10:36:31 +0000 |
---|---|---|
committer | Næþ'n Lasseter <Næþ'n Lasseter nathan@bytemark.co.uk> | 2016-02-15 10:36:31 +0000 |
commit | e6e6fe3cd13aaecf83cf3105c3fcd81db97481b5 (patch) | |
tree | 062b1ab136418abdf3c92f9b0dffa66ed9b900b3 | |
parent | 95090da408d106e2193d7d9f2db18520155c0191 (diff) |
Added windows option to costvm
-rwxr-xr-x | costvm | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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" |