first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / scripts / archival / snarf_hoople.pl
1 #!/usr/bin/perl
2
3 ###############################################################################
4 #                                                                             #
5 #  Name   : snarf_hoople2                                                     #
6 #  Author : Chris Koeritz                                                     #
7 #  Rights : Copyright (C) 1996-$now by Author                                 #
8 #                                                                             #
9 #  Purpose:                                                                   #
10 #                                                                             #
11 #    Backs up the full set of hoople 2.0 source code, plus some extra stuff.  #
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;  # let the snarfer hook us in.
25
26 # get the number attachment and increment it for the next use.
27 local($number) = &retrieve_number("aa_backup");
28
29 # variables used throughout here.
30 local($base) = &snarf_prefix("hoople2");
31 local($snarf_file) = &snarf_name($base, $number);
32
33 # store the archive number in the file for retrieval on the other side.
34 &backup_number("aa_backup", $base, $number);
35
36 # the top directory where everything we're grabbing lives.
37 local($root) = &canonicalize("$HOME/hoople2");
38
39 # grab the top level stuff.
40 &backup_files($base, $number, $root, ".", ("*.txt", "make*"));
41
42 # get the documentation directory.
43 &snarfer($base, $number, $root, "docs", ("-maxdepth", "1"));
44 # get an extra folder we like.
45 &backup_hierarchy($base, $number, "$root", "docs/text_examples");
46
47 # get the build scripts.
48 &backup_files($base, $number, $root, "build", ("*.ini"));
49 &backup_hierarchy($base, $number, "$root", "build/clam");
50 &backup_hierarchy($base, $number, "$root", "build/generator");
51 &backup_hierarchy($base, $number, "$root", "build/config");
52 &backup_hierarchy($base, $number, "$root", "build/jenkins");
53
54 # get all C++ code projects by resetting variable for main grab.
55 &backup_hierarchy($base, $number, "$root/source", ".");
56
57 # now rename the file so only the unpacker can access it.
58 &rename_archive($snarf_file);
59
60 exit 0;
61