gitprep / script / gitprep.cgi /
Newer Older
33 lines | 0.931kb
added module setup tool
Yuki Kimoto authored on 2013-03-30
1
#!/usr/bin/env perl
added Digest::SHA to cpanfil...
Yuki Kimoto authored on 2013-03-30
2

            
3
use strict;
4
use warnings;
added module setup tool
Yuki Kimoto authored on 2013-03-30
5

            
6
use File::Basename qw/basename dirname/;
7
use File::Spec::Functions qw/catdir splitdir/;
8

            
added Digest::SHA to cpanfil...
Yuki Kimoto authored on 2013-03-30
9
BEGIN {
10
  # Source directory has precedence
11
  my $script_name = basename __FILE__;
12
  my $base_dir_name = $script_name;
13
  $base_dir_name =~ s/\.cgi$//;
14
  my @base_dir = (splitdir(dirname __FILE__), $base_dir_name);
improved install process
Yuki Kimoto authored on 2013-04-09
15
  my $mojo_lib = join('/', @base_dir, 'mojo', 'lib');
added Digest::SHA to cpanfil...
Yuki Kimoto authored on 2013-03-30
16
  my $lib = join('/', @base_dir, 'lib');
17
  my $extlib = join('/', @base_dir, 'extlib', 'lib', 'perl5');
improved install process
Yuki Kimoto authored on 2013-04-09
18
  eval 'use lib $mojo_lib, $extlib, $lib';
added Digest::SHA to cpanfil...
Yuki Kimoto authored on 2013-03-30
19
  croak $@ if $@;
20
}
added module setup tool
Yuki Kimoto authored on 2013-03-30
21

            
added Digest::SHA to cpanfil...
Yuki Kimoto authored on 2013-03-30
22
use Mojolicious::Commands;
added module setup tool
Yuki Kimoto authored on 2013-03-30
23

            
24
# Check if Mojolicious is installed;
25
die <<EOF unless eval 'use Mojolicious::Commands; 1';
26
It looks like you don't have the Mojolicious framework installed.
27
Please visit http://mojolicio.us for detailed installation instructions.
28

            
29
EOF
30

            
31
# Start commands
fixed git_bin not found bug
Yuki Kimoto authored on 2013-03-31
32
$ENV{MOJO_MODE} = 'production';
added module setup tool
Yuki Kimoto authored on 2013-03-30
33
Mojolicious::Commands->start_app('Gitprep');