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

Revision 745, 818 bytes checked in by iwaim, 14 years ago (diff)

v-s-s: initオプションの追加

  • 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
24my $package_name = $ARGV[0];
25
26unless (defined $package_name && $package_name =~ m/^.+$/) {
27  print "require PACKAGE_NAME\n";
28  exit;
29}
30
31if ($version) {
32  print "vine-spec-skeleton version $VineLinux::VSS::VERSION\n";
33  exit;
34}
35elsif ($init) {
36  my $app = VineLinux::VSS->init($config);
37} else {
38my $app = VineLinux::VSS->new(config => $config, type => $type,
39                             package_name => $package_name);
40$app->run();
41}
Note: See TracBrowser for help on using the repository browser.