first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / scripts / archival / snarf_yeti.pl
1 #!/usr/bin/perl
2
3 ###############################################################################
4 #                                                                             #
5 #  Name   : snarf_yeti                                                        #
6 #  Author : Chris Koeritz                                                     #
7 #  Rights : Copyright (C) 1996-$now by Author                                 #
8 #                                                                             #
9 #  Purpose:                                                                   #
10 #                                                                             #
11 #    Gathers together the useful shell files and standard databases.          #
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 "importenv.pl";
22 require "shared_snarfer.pl";
23
24 &initialize_snarfer;
25
26 # get the number we use and increment it for the next use.
27 local($number) = &retrieve_number("aa_backup");
28
29 # variables for directory location to backup and the file to dump it in.
30 local($root) = $YETI_DIR;
31 local($base) = &snarf_prefix("yeti");
32 local($snarf_file) = &snarf_name($base, $number);
33
34 # store the current archive number in the file for retrieval on the
35 # other side.
36 &backup_number("aa_backup", $base, $number);
37
38 # get the whole yeti hierarchy in there.
39 &backup_hierarchy($base, $number, $root, ".");
40
41 # now rename the file so only the unpacker can access it.
42 &rename_archive($snarf_file);
43
44 exit 0;
45