source: projects/vine-spec-skeleton/trunk/bin/vine-spec-skeleton @ 746

Revision 746, 827 bytes checked in by iwaim, 14 years ago (diff)

v-s-s: versionオプション使用時にもパッケージ名が必要だったバグを修正

  • Property svn:executable set to *
Line 
1#!/usr/bin/perl
2# -*- coding:utf-8-unix; mode:cperl -*-
3
4use strict;
5use warnings;
6
7use VineLinux::VSS;
8use Getopt::Long;
9use File::Spec;
10
11my $vss_home = "$ENV{HOME}/.vine/app/vss";
12our $config = "$vss_home/config.yaml";
13
14my $type = '';
15
16GetOptions(
17           '--config=s', \$config,
18           '--type=s' , \$type,
19           '--init', \my $init,
20           '--version' => \my $version
21          );
22Getopt::Long::Configure("bundling");
23
24if ($version) {
25  print "vine-spec-skeleton version $VineLinux::VSS::VERSION\n";
26  exit;
27} elsif ($init) {
28  my $app = VineLinux::VSS->init($config);
29} else {
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();
39}
Note: See TracBrowser for help on using the repository browser.