3 # Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 # Copyright (C) $$Year-Rel$$ The Jalview Authors
6 # This file is part of Jalview.
8 # Jalview is free software: you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
12 # Jalview is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty
14 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 # PURPOSE. See the GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
18 # The Jalview Authors are detailed in the 'AUTHORS' file.
22 # perverse script to get rid of unwanted jar signatures
24 use File::Temp qw(tempdir);
26 my $tempdir = tempdir( CLEANUP => 1);
32 while (scalar @ARGV) {
33 my $jarfile = shift @ARGV;
34 ((-f $jarfile) and $jarfile=~/.+\.jar/)
35 and push @jarfiles, abs_path($jarfile);
40 while (scalar @jarfiles) {
41 $jarfile = shift @jarfiles;
43 system("jar xf $jarfile");
44 system("mv $jarfile $jarfile.bak");
45 system("find META-INF \\( -name \"*.SF\" \\) -exec rm -f \\{\\} \\;");
46 system("find META-INF \\( -name \"*.RSA\" \\) -exec rm -f \\{\\} \\;");
47 system("find META-INF \\( -name \"*.DSA\" \\) -exec rm -f \\{\\} \\;");
48 system("jar cf $jarfile *");