diff options
author | Oliver Tappe | 2007-03-16 23:16:29 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-03-16 23:16:29 +0100 |
commit | fd1f35c3df88d0c95111eebc748e710c06d77285 (patch) | |
tree | 7a19ccbf5f0c0f5280eaa38a8f412fff4f64e125 /installer/slxos-export | |
parent | * removed nbd-squashfs from the supported export types, as long as it is not ... (diff) | |
download | core-fd1f35c3df88d0c95111eebc748e710c06d77285.tar.gz core-fd1f35c3df88d0c95111eebc748e710c06d77285.tar.xz core-fd1f35c3df88d0c95111eebc748e710c06d77285.zip |
* changed option to list supported export types from '--list' to '--list-types'
* added option '--list-exported' which gives a list of exported vendor-OSes
* added option '--list-installed' which gives a list of installed vendor-OSes
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@777 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/slxos-export')
-rwxr-xr-x | installer/slxos-export | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/installer/slxos-export b/installer/slxos-export index f256110b..d2a139d9 100755 --- a/installer/slxos-export +++ b/installer/slxos-export @@ -33,14 +33,18 @@ use OpenSLX::OSExport::Engine; my ( $helpReq, $manReq, - $listReq, + $listExportedReq, + $listInstalledReq, + $listTypesReq, $verbose, $versionReq, ); GetOptions( 'help|?' => \$helpReq, - 'list' => \$listReq, + 'list-exported' => \$listExportedReq, + 'list-installed' => \$listInstalledReq, + 'list-types' => \$listTypesReq, 'man' => \$manReq, 'verbose' => \$verbose, 'version' => \$versionReq, @@ -54,9 +58,29 @@ if ($versionReq) { openslxInit(); -if ($listReq) { +if ($listExportedReq) { + print _tr("List of exported vendor-OSes:\n"); + foreach my $type (sort keys %supportedExportTypes) { + print join('', map { + s[^.+/][]; + "\t$type/$_\n"; + } + sort <$openslxConfig{'export-path'}/$type/*>); + } + exit 1; +} +if ($listInstalledReq) { + print _tr("List of installed vendor-OSes:\n"); + print join('', map { + s[^.+/][]; + "\t$_\n"; + } + sort <$openslxConfig{'stage1-path'}/*>); + exit 1; +} +if ($listTypesReq) { print _tr("List of supported export types:\n\t"); - print join("\n\t", keys %supportedExportTypes)."\n"; + print join("\n\t", sort keys %supportedExportTypes)."\n"; exit 1; } @@ -109,7 +133,15 @@ slxos-export [options] <vendor-os-name> <export-type> Prints a brief help message and exits. -=item B<--list> +=item B<--list-exported> + +Lists all exported vendor-OSes and exits. + +=item B<--list-installed> + +Lists all installed vendor-OSes and exits. + +=item B<--list-types> Lists all supported export types and exits. |