]>
Commit | Line | Data |
---|---|---|
5b74111a | 1 | ## Copyright (C) 1996-2018 The Squid Software Foundation and contributors |
a151895d AJ |
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 | ||
58fbbd9f | 8 | # |
9 | # This script reassembles a split configuration file back into a cf.data.pre | |
10 | # file. | |
11 | ||
58fbbd9f | 12 | /^NAME: / { |
13 | tag = $2; | |
a88b755a | 14 | dir = FILENAME; |
15 | gsub(/[^/\\]*$/, "", dir); | |
58fbbd9f | 16 | file=dir tag ".txt"; |
17 | $0 = "FILE_NOT_FOUND"; | |
a88b755a | 18 | if (!getline < file) |
19 | $0 = "FILE_NOT_FOUND"; | |
58fbbd9f | 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} |