From e6e6fe3cd13aaecf83cf3105c3fcd81db97481b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A6=C3=BE=27n=20Lasseter?= Date: Mon, 15 Feb 2016 10:36:31 +0000 Subject: Added windows option to costvm --- costvm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'costvm') 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" -- cgit v1.2.1