0d60dade |
1 | #! @PERL@ |
2 | # -*-perl-*- |
3 | # |
4 | # $Id: sw-tidy.in,v 1.1 1999/07/30 18:48:17 mdw Exp $ |
5 | # |
6 | # Tidy the `sw' index file |
7 | # |
8 | # (c) 1999 EBI |
9 | # |
10 | |
11 | #----- Licensing notice ----------------------------------------------------- |
12 | # |
13 | # This file is part of sw-tools. |
14 | # |
15 | # sw-tools is free software; you can redistribute it and/or modify |
16 | # it under the terms of the GNU General Public License as published by |
17 | # the Free Software Foundation; either version 2 of the License, or |
18 | # (at your option) any later version. |
19 | # |
20 | # sw-tools is distributed in the hope that it will be useful, |
21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 | # GNU General Public License for more details. |
24 | # |
25 | # You should have received a copy of the GNU General Public License |
26 | # along with sw-tools; if not, write to the Free Software Foundation, |
27 | # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
28 | |
29 | #----- Revision history ----------------------------------------------------- |
30 | # |
31 | # $Log: sw-tidy.in,v $ |
32 | # Revision 1.1 1999/07/30 18:48:17 mdw |
33 | # Tidy up the software index file. |
34 | # |
35 | |
36 | use lib "@pkgdatadir@"; |
37 | use SWConfig; |
38 | use SW; |
39 | |
40 | ($me = $0) =~ s:^.*/::; |
41 | |
42 | sub barf($) { |
43 | my ($err) = @_; |
44 | print STDERR "$me: $err\n"; |
45 | exit(1); |
46 | } |
47 | |
48 | $sw = SW->new(); |
49 | $sw->write() or barf("couldn't write new index file: $!"); |
50 | exit(0); |
51 | |
52 | #----- That's all, folks ---------------------------------------------------- |