From ebd67c0fcd398076baefb79c0b49e903f3807e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6nig?= <Alexander.Koenig@eurac.edu> Date: Thu, 19 Oct 2017 16:09:17 +0200 Subject: [PATCH] removed adapt_tos.pl. It belongs into the proper CLARIN DSpace repo --- commul-customization/adapt_tos.pl | 69 ------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 commul-customization/adapt_tos.pl diff --git a/commul-customization/adapt_tos.pl b/commul-customization/adapt_tos.pl deleted file mode 100644 index db5b1c2..0000000 --- a/commul-customization/adapt_tos.pl +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl - -use Modern::Perl '2015'; - -my $tosfile = '/opt/repository/sources/dspace/dspace-xmlui/src/main/webapp/themes/UFAL/lib/html/terms-of-service.html'; -my $outfile = '/opt/repository/sources/dspace/dspace-xmlui/src/main/webapp/themes/UFAL/lib/html/terms-of-service.html.new'; -my $locpropfile = '/opt/repository/sources/dspace/local.properties'; - -my ($repo_name,$centre_legal_entity,$full_address,$country,$city); - -open (my $tos, '<', $tosfile); -open (my $out, '>', $outfile); -open (my $lp, '<', $locpropfile); - -while (my $in = <$lp>) -{ - if ($in =~ /^dspace\.name/) - { - (undef,$repo_name) = split /=/, $in; - chomp $repo_name; - $repo_name =~ s/^\s//; - } - elsif ($in =~ /^lr.description.institution /) - { - (undef,$centre_legal_entity) = split /=/, $in; - chomp $centre_legal_entity; - $centre_legal_entity =~ s/^\s//; - } - elsif ($in =~ /^lr.description.location/) - { - (undef,$full_address) = split /=/, $in; - chomp $full_address; - $full_address =~ s/^\s//; - } - elsif ($in =~ /^lr.description.shortLocation/) - { - (undef,my $location) = split /=/, $in; - chomp $location; - ($city,$country) = split /,/, $location; - $city =~ s/^\s//; - $country =~ s/^\s//; - } -} - -while (my $line = <$tos>) -{ - if ($line =~ /REPOSITORY_NAME/) - { - $line =~ s/\$REPOSITORY_NAME/$repo_name/; - } - if ($line =~ /A_CENTRE_OR_UNIT_WITH_LEGAL_PERSONALITY/) - { - $line =~ s/\$A_CENTRE_OR_UNIT_WITH_LEGAL_PERSONALITY/$centre_legal_entity/; - } - if ($line =~ /FULL_ADDRESS/) - { - $line =~ s/\$FULL_ADDRESS/$full_address/; - } - if ($line =~ /COUNTRY/) - { - $line =~ s/\$COUNTRY/$country/; - } - if ($line =~ /CITY/) - { - $line =~ s/\$CITY/$city/; - } - print $out $line; -} - -- GitLab