Skip to content

Commit

Permalink
Bug #1, Travis-CI fix - Perl file paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nfreear committed Apr 14, 2017
1 parent 2c8450b commit 4d036fa
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = function (grunt) {

grunt.initConfig({
exec: {
bulletins: 'cd perl/; perl bulletins.pl',
build_site: 'cd perl/; perl e-access.pl'
bulletins: 'perl perl/bulletins.pl',
build_site: 'perl perl/e-access.pl'
},
jshint: {
options: {
Expand Down
16 changes: 10 additions & 6 deletions perl/bulletins.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,25 @@
#
# Example TEN: http://www.headstar.com/eab/issues/2002/dec2002.txt
#
# Copyright N.D.Freear, 16 July 2003.
# Copyright (c) Nick Freear, 16 July 2003.
# ==============================================================================
# Force, $OUTPUT_AUTOFLUSH.
$| = 1;
use strict;
use warnings;
use FindBin;

my $dir = $FindBin::Bin;

&log_to_file();

# Parsers.
my $tens2html="perl -w tens2html.pl";
my $tens2html="perl -w $dir/tens2html.pl";
# Pre-TENS only.
my $txt2html ="perl -w ..\\..\\txt2html\\perl\\txt2html.pl -l ..\\..\\txt2html\\perl\\txt2html.dict";
my $tidy = "\"/_e/apps/tidy/tidy.exe\" -access 1 -language en -utf8 -asxhtml";

my $idx_file="../eab_base/archive.html";
my $idx_file="$dir/../eab_base/archive.html";
my $url_stem="http://www.headstar.com/eab";
my $url_issues="$url_stem/issues";

Expand Down Expand Up @@ -85,8 +89,8 @@
my $tens_link="issues/$year/$mnth$year.txt";
my $html_link="issues/$year/$mnth$year.html";

my $tens_file="../eab/$tens_link";
my $html_file="../eab/$html_link";
my $tens_file = "$dir/../eab/$tens_link";
my $html_file = "$dir/../eab/$html_link";

if( 1==$b_parse && (-r $tens_file) ){
#Ok, parse.
Expand Down Expand Up @@ -208,7 +212,7 @@ sub log_to_file {
my $em='';
$em = 'em_perl' if ($2 eq 'bat');
#NDF 28 June 2012: my $log="logs/00$1.log";
my $log="logs/00bulletins.log";
my $log="$dir/../logs/00bulletins.log";
open( LOG, "$mode$log" ) or die "Failed to open, $!: $mode$log\n"; #"$mode$log"
warn "Building, see: $1.log\n";
# Install a 'warn' handler.
Expand Down
16 changes: 9 additions & 7 deletions perl/e-access.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
#
# E-Access Bulletin Web build script: HTML pages from a template and content file.
#
# (c) Nick Freear, 15 September 2003.
# Copyright (c) Nick Freear, 15 September 2003.
# ==============================================================================
# Force, $OUTPUT_AUTOFLUSH.
$| = 1;
use strict;
use warnings;
use FindBin;

my $dir = $FindBin::Bin;

# Hack for logging in Win 9x. (Append >>)
$0=~/(.*)\./;
$0 =~ /(.*)\./;
#NDF 28 jun 2012, my $log="logs/00$1.log";
my $log="logs/00e-access.log";
my $log="$dir/../logs/00e-access.log";
open(LOG, ">$log") or die "Failed to open: $log\n";
warn "Building, see: $log\n";
# Install a 'warn' handler.
Expand All @@ -23,8 +26,8 @@
warn "__ BUILD [$0 $version] log $now_string __\n\n";

# ==============================================================================
my $dest="../eab/";
my $src="../eab_base/";
my $dest = "$dir/../eab/";
my $src = "$dir/../eab_base/";

my $base="__E-ACCESS__";
my @files=("index","about","archive","contact","language1",
Expand All @@ -49,7 +52,7 @@
open(BASE, $base_file) or die "Failed to open base: $base_file\n";
open(OFILE, ">$dest_file") or die "Failed to open destination: $dest_file\n";
select(OFILE);

my $score = &combine_files;

close(OFILE);
Expand Down Expand Up @@ -137,4 +140,3 @@ sub combine_files
}
return $score;
}

1 change: 1 addition & 0 deletions perl/tens2html.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#
# Example TEN: http://www.headstar.com/eab/issues/2003/jul2003.txt
#
# Copyright (c) Nick Freear 2003-2010.
# Copyright 2003-07-22/2010-07-03 N.D.Freear.
# ==============================================================================
# Force, $OUTPUT_AUTOFLUSH.
Expand Down

0 comments on commit 4d036fa

Please sign in to comment.