2 #*******************************************************************************
3 # Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
4 # Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
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 #*******************************************************************************
21 # perverse script to get rid of unwanted jar signatures
23 use File::Temp qw(tempdir);
25 my $tempdir = tempdir( CLEANUP => 1);
31 while (scalar @ARGV) {
32 my $jarfile = shift @ARGV;
33 ((-f $jarfile) and $jarfile=~/.+\.jar/)
34 and push @jarfiles, abs_path($jarfile);
39 while (scalar @jarfiles) {
40 $jarfile = shift @jarfiles;
42 system("jar xf $jarfile");
43 system("mv $jarfile $jarfile.bak");
44 system("find META-INF \\( -name \"*.SF\" \\) -exec rm -f \\{\\} \\;");
45 system("find META-INF \\( -name \"*.RSA\" \\) -exec rm -f \\{\\} \\;");
46 system("find META-INF \\( -name \"*.DSA\" \\) -exec rm -f \\{\\} \\;");
47 system("jar cf $jarfile *");