Revision 499,
744 bytes
checked in by iwaim, 15 years ago
(diff) |
vine-spec-skeleton: 引数にパッケージ名がない場合にファイルを生成しないように。
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/usr/bin/perl |
---|
2 | # -*- coding:utf-8-unix; mode:cperl -*- |
---|
3 | |
---|
4 | use strict; |
---|
5 | use warnings; |
---|
6 | |
---|
7 | use lib './../lib'; |
---|
8 | |
---|
9 | use VineLinux::VSS; |
---|
10 | use Getopt::Long; |
---|
11 | use File::Spec; |
---|
12 | |
---|
13 | my $vss_home = "$ENV{HOME}/.vine/app/vss"; |
---|
14 | my $config = "$vss_home/config.yaml"; |
---|
15 | |
---|
16 | my $type = ''; |
---|
17 | |
---|
18 | GetOptions( |
---|
19 | '--config=s', \$config, |
---|
20 | '--type=s' , \$type, |
---|
21 | '--version' => \my $version |
---|
22 | ); |
---|
23 | Getopt::Long::Configure("bundling"); |
---|
24 | |
---|
25 | my $package_name = $ARGV[0]; |
---|
26 | |
---|
27 | unless (defined $package_name && $package_name =~ m/^.+$/) { |
---|
28 | print "require PACKAGE_NAME\n"; |
---|
29 | exit; |
---|
30 | } |
---|
31 | |
---|
32 | if ($version) { |
---|
33 | print "vine-spec-skeleton version $VineLinux::VSS::VERSION\n"; |
---|
34 | exit; |
---|
35 | } |
---|
36 | |
---|
37 | my $app = VineLinux::VSS->new(config => $config, type => $type, |
---|
38 | package_name => $package_name); |
---|
39 | $app->run(); |
---|
Note: See
TracBrowser
for help on using the repository browser.