Kaydet (Commit) dbb07032 authored tarafından Matúš Kukan's avatar Matúš Kukan Kaydeden (comit) David Tardon

solenv/bin: remove unreferenced obsoleted scripts

And move striplanguagetags.sh to bin/ - possibly it's used.

Change-Id: I68e23ef543f4e26f617d9860681273234ec9174c
Reviewed-on: https://gerrit.libreoffice.org/4239Reviewed-by: 's avatarMathias M <matm@gmx.fr>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst cb1ec05a
#!/bin/sh -e
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
if [ -z "$1" ]; then
exit 1;
fi
mkdir -p "$1"/bin
mkdir -p "$1"/inc
mkdir -p "$1"/lib
mkdir -p "$1"/misc
mkdir -p "$1"/obj
mkdir -p "$1"/slb
mkdir -p "$1"/slo
#!/bin/bash
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
# This script is needed in the process of generating exported
# symbols list out of map files on MinGW
# The magic generating the regular expression from the temporary
# mapfile containing only star and question mark symbols
#
# The script has to be called as follows:
# nm -gx <file>.o | addsym-mingw.sh <file-with-wildcard-symbols> <temporary-file-where-to-write-the-search-expression-to>
# See tg_shl.mk for an example of how to use the script
#
# Replace every * with .* and every ? with . to get awk expression
# Remove whitespaces and comments in expression
# Put ^ at the beginning of every expression
# Put $ at the beginning of every expression
# Connect them all on one line, separated by |
# Remove | at the end of this regular expression because the last end
# of line was also replaced by |
if [ -s $1 ]
then
cat $1 | sed 's#*#.*#g
s#?#.#g
s#;.*##g
s# ##g
s# ##g
s#^#^#
s#$#$#' | tr '\n' '|' | sed "s#|\$##" >$2
# Please note that the awk expression expects to get the output of 'nm -gP'!
awk -v SYMBOLSREGEXP="`cat $2`" '
match (substr ($1,2) ,SYMBOLSREGEXP) > 0 { print substr ($1,2) ";" }'
fi
s/\(\.\.\/\)\{2,4\}/..\//g
s/\(\.\.\\\)\{2,4\}/..\\/g
:
eval 'exec perl -wS $0 ${1+"$@"}'
if 0;
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
while (<>)
{
next if /^Only in/ ;
next if /^diff -rc / ;
next if /^diff -ru / ;
next if /^Common sub/ ;
if ( /^---/ || /^\*\*\*/ || /^\+\+\+/ )
{
s/\\/\//g;
}
print ;
}
#! /usr/bin/env perl
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# reads a list of dependency files from a file, opens and
# concatenates them, while eliding duplicate nop rules.
use File::Spec;
sub read_depfiles($)
{
my $name = shift;
my $depfh;
my @files;
open ($depfh, $name) || die "Can't open list of dependencies: $name: $!";
while (<$depfh>) {
push @files, split(/\s+/, $_);
}
close ($depfh);
# print STDERR "dep files: " . join ("'", @files) . "\n";
return @files;
}
my @depfiles = read_depfiles (shift @ARGV);
my %rules;
print "# concatenated, reduced dependencies generated by solenv/bin/concat-deps.pl\n";
print "# generated with \$(SRCDIR) = $ENV{SRCDIR}\n";
print "# generated with \$(OUTDIR) = $ENV{OUTDIR}\n";
my $boost_path = $ENV{OUTDIR} . '/inc/boost/';
for my $fname (@depfiles) {
my $fileh;
next if ($fname eq '');
open ($fileh, $fname) || die "Can't open $fname: $!\n";
my $last = '';
my $rule_count = 0;
my $with_boost_count = 0;
while (<$fileh>) {
# canonicalise path
m/^(\s*)([^\s\n:]*)(.*\n?)$/;
my $pre = $1;
my $path = $2;
my $post = $3;
$rule_count++ if ($post =~ m/:/);
if (length($path) > 0 && index($path,$ENV{SRCDIR}) == 0) {
$path = File::Spec->rel2abs($2);
if (index($path,$ENV{OUTDIR}) == 0) {
my $solverpath = substr($path, length($ENV{OUTDIR}));
if ($solverpath =~ m|/inc/boost/|) {
if ($with_boost_count != $rule_count || !($post =~ m/\\/)) {
$path = '$(OUTDIR)/inc/boost/deliver.log';
$with_boost_count = $rule_count;
} else { # elide it
$path = ''; $pre = ''; $post = '';
}
} else {
$path = "\$(OUTDIR)" . $solverpath;
}
} else {
$path = "\$(SRCDIR)" . substr($path, length($ENV{SRCDIR}));
}
}
$line = "$pre$path$post";
if ($line eq "\n") {
if ($last =~ /^(.*):\s*$/) {
if (defined $rules{$1}) {
$last = '';
next;
}
$rules{$1} = 1;
}
}
print $last;
$last = $line;
}
print "$last\n"; # in case of missing newline
close ($fileh);
}
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
#
# convertlinks - a perl script to make hrefs to
# http://api.openoffice.org/common/ref relativ.
#
use File::Find;
# for the convenience of &wanted calls, including -eval statements:
use vars qw/*name *dir/;
*name = *File::Find::name;
*dir = *File::Find::dir;
@files = ();
if($#ARGV == 1)
{
$pattern = "www";
} else
{
$pattern = $ARGV[2];
}
find(\&wanted, "$ARGV[0]");
$return = 1;
foreach $i (@files)
{
next if( $i->{directory} =~ /.*common((\/|\\)ref(.*))/ ||
$i->{directory} =~ /.*cpp((\/|\\)ref(.*))/ ||
$i->{directory} =~ /.*java((\/|\\)ref(.*))/ );
open ( FILEIN, $i->{filename} ) || die "could not open $i->{filename} for reading";
$relPath = ".";
$relToSource = ".";
if( $i->{directory} =~ /.*$pattern((\/|\\)(.*))/ )
{
$relPath = $3;
$relPath =~ s#\w+#\.\.#go;
if($pattern eq "examples")
{
$relPath = "\.\.\/$relPath";
}
if($pattern eq "www")
{
$relToSource = "\.\.\/$relPath";
} else
{
$relToSource = $relPath;
}
} else
{
if($pattern eq "examples")
{
$relPath = "\.\.";
}
if($pattern eq "www")
{
$relToSource = "\.\.";
} else
{
$relToSource = $relPath;
}
}
@lines = <FILEIN>;
close( FILEIN );
open( FILEOUT, ">$i->{filename}.tmp" ) || die "could not open $i->{filename} for writing";
foreach $_ (@lines)
{
# change the refenreces to the index in dependency of UDK or ODK
if("$ARGV[1]" eq "udk_" | "$ARGV[1]" eq "odk_")
{
s#((\")(index.html\"))#$2$ARGV[1]$3#go;
s#((\/|\")(faq.html\"))#$2$ARGV[1]$3#go;
s#((\/|\")(bylaws.html\"))#$2$ARGV[1]$3#go;
}
s#((http:\/\/api\.openoffice\.org\/)(common\/ref[^\"]+))#$relPath\/$3#go;
s#((http:\/\/api\.openoffice\.org\/unbranded-source\/)(.*)(examples\/examples.html))#$relToSource\/$4#go;
if($pattern eq "examples")
{
# change the links for the C++/Java examples in the ODK
s#((http:\/\/api\.openoffice\.org\/source\/browse\/api\/odk\/examples\/)(java\/*))#$3#go;
s#((http:\/\/api\.openoffice\.org\/source\/browse\/api\/odk\/examples\/)(cpp\/*))#$3#go;
s#((http:\/\/api\.openoffice\.org\/source\/browse\/api\/odk\/examples\/)(basic\/*))#$3#go;
s#((http:\/\/api\.openoffice\.org\/source\/browse\/api\/odk\/examples\/)(OLE\/*))#$3#go;
# change link api specific stuff
s#((http:\/\/api\.openoffice\.org\/)(design_guide.html))#$relPath\/www\/$3#go;
s#(http:\/\/api\.openoffice\.org\/index.html)#$relPath\/www\/odk_index.html#go;
# change the links for the C++ examples in the UDK
s#((http:\/\/udk\.openoffice\.org\/source\/browse\/udk\/product\/examples\/)(cpp\/*))#$3#go;
# change the links to udk.openoffice.org to relativ links
s#(http:\/\/udk\.openoffice\.org\/index.html)#$relPath\/www\/udk_index.html#go;
s#((http:\/\/udk\.openoffice\.org)(\/*))#$relPath\/www$3#go;
# change the link to tutorial
s#((http:\/\/api\.openoffice\.org\/)(basic\/man\/tutorial\/tutorial.pdf))#$relPath\/www\/$3#go;
}
print FILEOUT $_;
}
close FILEOUT;
chmod 0666, $i->{filename};
rename "$i->{filename}.tmp", $i->{filename} || die "could not rename $i->{filename}.tmp to $i->{filename}";
$return = 0;
}
exit $return;
sub wanted {
%file = (
directory => $dir,
filename => $name
);
push @files, {%file} if /^.*\.html\z/s;
}
:
eval 'exec perl -wS $0 ${1+"$@"}'
if 0;
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
#
# pushids - push HID.LST and *.win files for userexperience feedback
#
use lib ("$ENV{SOLARENV}/bin/modules", "$ENV{COMMON_ENV_TOOLS}/modules");
use Carp;
sub parse_info($$);
if ( @ARGV != 3 )
{
print "usage: $ARGV[0] <path tp hid.lst> <path to *.win files> <output file>\n";
print "example: $ARGV[0] ./hid.lst global/win common/misc/UserFeedbackNames.csv\n\n";
die "invalid params";
}
my ($hid, $winpath, $outfile) = @ARGV;
my @names;
open HID, "<$hid" or die "can't open file $filename $! $^E";
for (<HID>) {
chop;
my ($longname, $ID) = split " +";
next if ( ! $ID );
$upperlongname = $longname;
$upperlongname =~ tr/a-z/A-Z/;
$undeclared_hids{$upperlongname} = $longname;
if ( exists $hids{$upperlongname} && ( $hids{$upperlongname} != $ID ) )
{
print STDERR "warn: unclear definition of longname: $longname = $hids{$upperlongname} or $ID\n";
}
$hids{$upperlongname} = $ID;
if ( exists $revhids{ $ID } && ( $revhids{ $ID } ne $upperlongname ) )
{
print STDERR "warn: two longnames have the same ID: $longname and $revhids{$ID} share ID $ID\n";
}
$revhids{$ID} = $upperlongname;
}
close HID;
undef @revhids;
#Add Active
$hids{"ACTIVE"} = 0;
my %dialogs = ();
foreach ( glob("$winpath/*win") ) {
$filename = $_;
open WIN, "< $filename" or die "can't open file $filename $! $^E";
my $parentinfo = "";
my @dialog = ();
my $parentshortname = "";
for ( <WIN> ) {
chop;
s/^ +//;
s/ +/ /g;
next if /^ *'/;
next if /^ *$/;
my $ID = "";
my $iteminfo;
my ($shortname, $longname) = split " +";
$shortname = "" if ( !$shortname );
$longname = "" if ( !$longname );
# fake a correct entry if only *active is given and overwrite the attempt to declare it differently
if ( $shortname =~ /\*active/i )
{
$longname = "Active";
}
# find UNO Names
if ( $longname =~ /^(.uno:|http|private:factory|service:|macro:|.HelpId:)/i || $longname =~ s/^sym://i )
{
$ID = $longname;
$longname = "";
}
else
{
my $upperlongname = $longname;
$upperlongname =~ tr/a-z/A-Z/;
if ( $shortname !~ /^[\+\*]/ && !exists $hids{$upperlongname} )
{
print STDERR "warn: Longname not in hid.lst: $filename $longname\n";
}
if ( exists $hids{$upperlongname} )
{
$ID = $hids{$upperlongname};
}
delete $undeclared_hids{$upperlongname};
}
$iteminfo = "$shortname $longname $ID";
$iteminfo =~ s/^\*//;
$iteminfo =~ s/^\+//;
# find start of deklaration
if ( $shortname =~ s/^\+// )
{
# copy existing dialog
if ( exists $dialogs{ $longname } )
{
my @old = @{$dialogs{ $longname }};
my ($oldshort, $oldlong, $oldID ) = split ( " ", shift @old );
$iteminfo = "$shortname $oldlong $oldID";
$parentinfo = $iteminfo;
$parentshortname = $shortname;
$dialogs{ $parentshortname } = \@dialog;
@dialog = (); # break the link
push ( @{$dialogs{ $parentshortname }}, $iteminfo );
push @names, " $parentinfo";
for ( @old )
{
push @names, "$parentinfo $_";
}
}
else
{ # fake new dialog instead
$shortname = "*".$shortname;
}
}
if ( $shortname =~ s/^\*// )
{
$parentinfo = $iteminfo;
$parentshortname = $shortname;
$dialogs{ $parentshortname } = \@dialog;
@dialog = (); # break the link
push ( @{$dialogs{ $parentshortname }}, $iteminfo );
push @names, " $parentinfo";
}
else
{
push ( @{$dialogs{ $parentshortname }}, $iteminfo );
push @names, "$parentinfo $iteminfo";
}
}
close WIN;
}
for ( keys %undeclared_hids ) {
$iteminfo = "$undeclared_hids{$_} $undeclared_hids{$_} $hids{$_}";
push @names, " $iteminfo";
}
#----------------------------------------------------------------------------
# write to files
open HIDS, ">$outfile" or die "can't open file $filename $! $^E";
print HIDS join "\n", @names;
print HIDS "\n";
close HIDS;
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
BEGIN { global_found = "false" }
/[ \t]*#/ { sub("#.*", "") }
/[ \t]*local:/ { global_found = "false" }
/[ \t]*}/ { global_found = "false" }
/^[ \t]*$/ { next }
global_found == "true" { print $0 }
/[ \t]*global:/ { global_found = "true" }
#!/usr/bin/perl -w
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
# langwrap - language wrapper for building resources
#
use Getopt::Std;
###### globals ######
$is_debug = 0;
$nfield = 0;
@LoL = ();
@command = ();
###### main ######
# Version
print "langwrap -- Version: 1.2\n";
# Options
&check_options();
# parse command file
&parse_commandfile($opt_c);
# create list with command lines
&create_commands();
# finally execute commands
foreach $cmd (@command) {
if ($is_debug) {
print $cmd . "\n";
} else {
system($cmd);
$res = $? >> 8;
if ($res) {
print "langwrap: command execution failed with exitcode $res.\n";
exit($res);
}
}
}
exit(0);
###### routines ######
### parse_commandfile()
sub parse_commandfile {
my($file) = shift;
my(@field);
open(COMMAND, "<$file") or die "cant open $file";
while (<COMMAND>) {
$line = $_;
chomp($line);
if ( ($line =~ //) || ($line =~ /^\r/) || ($line =~ /^#/) ) {
next;
}
@field = split " ", $line;
push @LoL, [@field];
if (!$nfield) {
$nfield = $#field + 1;
} else {
if ( $nfield != ($#field + 1) ) {
print "langwrap: error in <cmdfile>: every row must ";
print "have the same # of columns.\n";
exit(3);
}
}
}
close(COMMAND);
}
### create_command()
sub create_commands() {
my($cmd, $cmdline, $arg_string, $ntempl);
$cmd = shift @ARGV;
$arg_string = join(" ", @ARGV);
# just count the number of templates
$ntempl = ($arg_string =~ s/@\d+@/$&/eg);
if ( $ntempl >= $nfield ) {
print "lnagwrap: # of templates > # of fields in <cmdfile>.\n";
exit(4);
}
# create command lines
for $i (0..$#LoL) {
$cmdline = $arg_string;
$cmdline =~ s/@(\d+)@/$LoL[$i][$1]/eg;
push @command, $cmd . " " . $cmdline;
}
}
### check_options()
sub check_options {
if ( !getopts('c:') ) {
&usage();
}
if ( !$opt_c ) {
&usage();
}
if ( ! -r $opt_c ) {
print "langwrap: $opt_c is not a readable file.\n";
exit(2);
}
if ( $#ARGV < 1 ) {
print "langwrap: empty <template_string>.\n";
&usage();
}
}
### usage()
sub usage {
print "Usage: langwrap -c cmdfile tool <template_string>\n";
print "<template_string> is of form: ...\@1\@ .... \@2\@...\n";
print "with \@<n>\@ template #n\n";
exit(1);
}
:
eval 'exec perl -wS $0 ${1+"$@"}'
if 0;
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#