author | Simon Howkins <simonh@symbian.org> |
Fri, 19 Mar 2010 11:20:24 +0000 | |
changeset 936 | e6a0e92cf215 |
parent 924 | a5ed0e6ca679 |
child 955 | 28714977dccb |
permissions | -rw-r--r-- |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
1 |
#!perl -w |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
2 |
# |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
3 |
# Copyright (c) 2010 Symbian Foundation Ltd |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
4 |
# This component and the accompanying materials are made available |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
5 |
# under the terms of the License "Eclipse Public License v1.0" |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
6 |
# which accompanies this distribution, and is available |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
8 |
# |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
9 |
# Initial Contributors: |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
10 |
# Symbian Foundation Ltd - initial contribution. |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
11 |
# |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
12 |
# Contributors: |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
13 |
# |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
14 |
# Description: |
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
15 |
# Search physical drives to find either: |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
16 |
# * The one with the largest amount of free space |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
17 |
# * The one with the greatest capacity |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
18 |
# * The list of all such drives |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
19 |
|
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
20 |
use strict; |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
21 |
|
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
22 |
use Getopt::Long; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
23 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
24 |
# Read option arguments |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
25 |
my $option; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
26 |
my $ok = GetOptions( |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
27 |
'capacity' => \$option->{capacity}, |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
28 |
'space' => \$option->{space}, |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
29 |
'all' => \$option->{all}, |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
30 |
'help|?' => \$option->{help}, |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
31 |
); |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
32 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
33 |
if (defined $option->{help}) |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
34 |
{ |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
35 |
usage(); |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
36 |
exit; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
37 |
} |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
38 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
39 |
if (!$ok || @ARGV || 1 != scalar grep { defined $option->{$_} } keys %$option) |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
40 |
{ |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
41 |
warn "Exactly one option must be supplied to indicate the required output\n$ok\n@ARGV\n"; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
42 |
usage(); |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
43 |
exit(1); |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
44 |
} |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
45 |
|
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
46 |
# Use Windows command to list physical volumes on the machine |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
47 |
# (No substed drives, or mapped network drives) |
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
48 |
my @details = map {chomp;$_} `echo list volume | diskpart`; |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
49 |
|
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
50 |
my @drives; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
51 |
my %space; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
52 |
my %capacity; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
53 |
for my $driveLine (@details) |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
54 |
{ |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
55 |
# If this line of output is actually about a healthy HD volume... |
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
56 |
if ($driveLine =~ m{^\s+Volume \d+\s+([A-Z]).*?(Partition|RAID-5)\s+(\d+) ([A-Z]+)\s+Healthy} ) |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
57 |
{ |
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
58 |
my ($letter, $capacityValue, $capacityUnit) = ($1, $3, $4); |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
59 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
60 |
my %multiplier = ( |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
61 |
MB => 1000000, |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
62 |
GB => 1000000000, |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
63 |
TB => 1000000000000, |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
64 |
); |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
65 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
66 |
if (not exists $multiplier{$capacityUnit}) |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
67 |
{ |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
68 |
warn "Don't know how to interpret $capacityValue $capacityUnit\n"; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
69 |
next; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
70 |
} |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
71 |
$capacityValue *= $multiplier{$capacityUnit}; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
72 |
|
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
73 |
# Ignore the system drive |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
74 |
next if ($driveLine =~ m{System\s*$}); |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
75 |
|
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
76 |
# Use dir to get the freespace (bytes) |
924
a5ed0e6ca679
findphysicaldrive.pl - Fixed so it works with empty (freshly formatted) drives.
SimonH <simonh@symbian.org>
parents:
891
diff
changeset
|
77 |
my @bytesFree = grep { s{^.*?(\d+) bytes free\s*$}{$1} } map {chomp;$_} `cmd /c dir /-C /A $letter:\\`; |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
78 |
# Take the value from the bottom of the report |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
79 |
my $bytesFree = $bytesFree[-1]; |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
80 |
|
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
81 |
# Record info for this volume |
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
82 |
push @drives, $letter; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
83 |
$space{$bytesFree} = $letter; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
84 |
$capacity{$capacityValue} = $letter; |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
85 |
} |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
86 |
} |
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
87 |
|
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
88 |
die "Unable to find any suitable drives at all\n" unless %space; |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
89 |
|
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
90 |
if ($option->{all}) |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
91 |
{ |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
92 |
print join ",", map { "$_:" } @drives; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
93 |
print "\n"; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
94 |
exit; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
95 |
} |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
96 |
elsif ($option->{capacity}) |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
97 |
{ |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
98 |
# Sort by capacity to find the largest volume and print out the corresponding letter |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
99 |
print "$capacity{(reverse sort keys %capacity)[0]}:\n"; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
100 |
} |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
101 |
elsif ($option->{space}) |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
102 |
{ |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
103 |
# Sort by space to find the volume with the largest amount of space and print out the corresponding letter |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
104 |
print "$space{(reverse sort keys %space)[0]}:\n"; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
105 |
} |
858
f9fc2a3f8f70
Code to automatically find a physical drive for running a build, triggered as necessary.
Simon Howkins <simonh@symbian.org>
parents:
diff
changeset
|
106 |
|
891
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
107 |
exit; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
108 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
109 |
sub usage |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
110 |
{ |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
111 |
$0 =~ m{[\\/]([^\\/]*)$}; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
112 |
print <<EOT; |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
113 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
114 |
Usage: $1 -all | -capacity | -space | -help |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
115 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
116 |
-all Outputs all physical drives in the system (separated by ','). |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
117 |
-capacity Outputs physical drive of greatest capacity in the system. |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
118 |
-space Outputs physical drive with greatest free space in the system. |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
119 |
-help Outputs this help message. |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
120 |
|
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
121 |
EOT |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
122 |
} |
6c56420d1006
Updated capabilities of findPhysicalDrive to support imminent work on locating the hg cache.
Simon Howkins <simonh@symbian.org>
parents:
858
diff
changeset
|
123 |