1 #*******************************************************************************
2 # Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 # Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
5 # This file is part of Jalview.
7 # Jalview is free software: you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11 # Jalview is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty
13 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 # PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
17 #*******************************************************************************
21 # Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
22 # Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
24 # This file is part of Jalview.
26 # Jalview is free software: you can redistribute it and/or
27 # modify it under the terms of the GNU General Public License
28 # as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
30 # Jalview is distributed in the hope that it will be useful, but
31 # WITHOUT ANY WARRANTY; without even the implied warranty
32 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR
33 # PURPOSE. See the GNU General Public License for more details.
35 # You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
38 # perverse script to get rid of unwanted jar signatures
40 use File::Temp qw(tempdir);
42 my $tempdir = tempdir( CLEANUP => 1);
48 while (scalar @ARGV) {
49 my $jarfile = shift @ARGV;
50 ((-f $jarfile) and $jarfile=~/.+\.jar/)
51 and push @jarfiles, abs_path($jarfile);
56 while (scalar @jarfiles) {
57 $jarfile = shift @jarfiles;
59 system("jar xf $jarfile");
60 system("mv $jarfile $jarfile.bak");
61 system("find META-INF \\( -name \"*.SF\" \\) -exec rm -f \\{\\} \\;");
62 system("find META-INF \\( -name \"*.RSA\" \\) -exec rm -f \\{\\} \\;");
63 system("find META-INF \\( -name \"*.DSA\" \\) -exec rm -f \\{\\} \\;");
64 system("jar cf $jarfile *");