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 *
RevLine 
[488]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
[492]11my $vss_home = "$ENV{HOME}/.vine/app/vss";
[745]12our $config = "$vss_home/config.yaml";
[488]13
14my $type = '';
15
16GetOptions(
17           '--config=s', \$config,
18           '--type=s' , \$type,
[745]19           '--init', \my $init,
[488]20           '--version' => \my $version
21          );
22Getopt::Long::Configure("bundling");
23
[491]24my $package_name = $ARGV[0];
25
[499]26unless (defined $package_name && $package_name =~ m/^.+$/) {
27  print "require PACKAGE_NAME\n";
28  exit;
29}
30
[488]31if ($version) {
32  print "vine-spec-skeleton version $VineLinux::VSS::VERSION\n";
33  exit;
34}
[745]35elsif ($init) {
36  my $app = VineLinux::VSS->init($config);
37} else {
[491]38my $app = VineLinux::VSS->new(config => $config, type => $type,
39                             package_name => $package_name);
[488]40$app->run();
[745]41}
Note: See TracBrowser for help on using the repository browser.