first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / scripts / archival / unsnarf.pl
1 #!/usr/bin/perl
2
3 ###############################################################################
4 #                                                                             #
5 #  Name   : unsnarf                                                           #
6 #  Author : Chris Koeritz                                                     #
7 #  Rights : Copyright (C) 1996-$now by Author                                 #
8 #                                                                             #
9 #  Purpose:                                                                   #
10 #                                                                             #
11 #    Unpacks a snarf file and updates the archive number for the file type.   #
12 #                                                                             #
13 ###############################################################################
14 #  This program is free software; you can redistribute it and/or modify it    #
15 #  under the terms of the GNU General Public License as published by the Free #
16 #  Software Foundation; either version 2 of the License or (at your option)   #
17 #  any later version.  See: "http://www.gruntose.com/Info/GNU/GPL.html" for a #
18 #  version of the License.  Please send any updates to "fred@gruntose.com".   #
19 ###############################################################################
20
21 require "shared_snarfer.pl";
22
23 # check that we received a parameter.
24 if ($#ARGV < 0) {
25   &print_instructions;
26   exit 1;
27 }
28
29 local($filename) = $ARGV[0];
30
31 &restore_archive($filename);
32
33 exit 0;
34
35 sub print_instructions {
36   print "this program needs a filename as a parameter.  the file will be\n";
37   print "unsnarfed into an appropriate subdirectory and the backup number\n";
38   print "will be updated.\n";
39   exit 1;
40 }
41
42