]> git.ipfire.org Git - thirdparty/squid.git/blob - scripts/merge-cf.data.pre.awk
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / scripts / merge-cf.data.pre.awk
1 ## Copyright (C) 1996-2018 The Squid Software Foundation and contributors
2 ##
3 ## Squid software is distributed under GPLv2+ license and includes
4 ## contributions from numerous individuals and organizations.
5 ## Please see the COPYING and CONTRIBUTORS files for details.
6 ##
7
8 #
9 # This script reassembles a split configuration file back into a cf.data.pre
10 # file.
11
12 /^NAME: / {
13 tag = $2;
14 dir = FILENAME;
15 gsub(/[^/\\]*$/, "", dir);
16 file=dir tag ".txt";
17 $0 = "FILE_NOT_FOUND";
18 if (!getline < file)
19 $0 = "FILE_NOT_FOUND";
20 if (/^FILE_NOT_FOUND/) {
21 print "ERROR: '" file "' not found!" > "/dev/stderr";
22 exit 1;
23 }
24 print;
25 while (getline < file) {
26 print;
27 }
28 next;
29 }
30 {print}