Revision 746,
827 bytes
checked in by iwaim, 14 years ago
(diff) |
v-s-s: versionオプション使用時にもパッケージ名が必要だったバグを修正
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[488] | 1 | #!/usr/bin/perl |
---|
| 2 | # -*- coding:utf-8-unix; mode:cperl -*- |
---|
| 3 | |
---|
| 4 | use strict; |
---|
| 5 | use warnings; |
---|
| 6 | |
---|
| 7 | use VineLinux::VSS; |
---|
| 8 | use Getopt::Long; |
---|
| 9 | use File::Spec; |
---|
| 10 | |
---|
[492] | 11 | my $vss_home = "$ENV{HOME}/.vine/app/vss"; |
---|
[745] | 12 | our $config = "$vss_home/config.yaml"; |
---|
[488] | 13 | |
---|
| 14 | my $type = ''; |
---|
| 15 | |
---|
| 16 | GetOptions( |
---|
| 17 | '--config=s', \$config, |
---|
| 18 | '--type=s' , \$type, |
---|
[745] | 19 | '--init', \my $init, |
---|
[488] | 20 | '--version' => \my $version |
---|
| 21 | ); |
---|
| 22 | Getopt::Long::Configure("bundling"); |
---|
| 23 | |
---|
| 24 | if ($version) { |
---|
| 25 | print "vine-spec-skeleton version $VineLinux::VSS::VERSION\n"; |
---|
| 26 | exit; |
---|
[746] | 27 | } elsif ($init) { |
---|
[745] | 28 | my $app = VineLinux::VSS->init($config); |
---|
| 29 | } else { |
---|
[746] | 30 | my $package_name = $ARGV[0]; |
---|
| 31 | |
---|
| 32 | unless (defined $package_name && $package_name =~ m/^.+$/) { |
---|
| 33 | print "require PACKAGE_NAME\n"; |
---|
| 34 | exit; |
---|
| 35 | } |
---|
| 36 | my $app = VineLinux::VSS->new(config => $config, type => $type, |
---|
| 37 | package_name => $package_name); |
---|
| 38 | $app->run(); |
---|
[745] | 39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.