summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-02-20 12:17:19 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-04-23 17:29:29 +0000
commit40d9ac93e0bf974439ae2abecbcc979c7dc9d06d (patch)
treed8625bbbd26ed5d727ec1d32fa21d9c021fc66a0 /util
parented66c932b1460ce5dcb3f7f1cb4c37f726683175 (diff)
Clean up help message for the public suffix list processor
The grep given in the help from the program to process the effective-TLD list only worked for voodoo reasons. Replaced it with an actually-correct use of grep. The commands given used the name effective_tld_names.dat in the URL fetched; however, the relevant file has (for some time now) said explicitly "Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat" Changed the name used to match that URL. Revised the output file's suggested name and the instructions for what to do with its contents, making clear they *replace* what was there before ... Fixed some typos and related ugliness. Change-Id: Iacd186c0003227d657099716262eb3a89c9e5f1b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'util')
-rw-r--r--util/corelib/qurl-generateTLDs/main.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/corelib/qurl-generateTLDs/main.cpp b/util/corelib/qurl-generateTLDs/main.cpp
index 7268fb077a..e1fe97646f 100644
--- a/util/corelib/qurl-generateTLDs/main.cpp
+++ b/util/corelib/qurl-generateTLDs/main.cpp
@@ -57,15 +57,15 @@ int main(int argc, char **argv) {
QCoreApplication app(argc, argv);
if (argc < 3) {
- printf("\nusage: %s inputFile outputFile\n\n", argv[0]);
+ printf("\nUsage: ./%s inputFile outputFile\n\n", argv[0]);
printf("'inputFile' should be a list of effective TLDs, one per line,\n");
- printf("as obtained from http://publicsuffix.org . To create indices and data file\n");
+ printf("as obtained from http://publicsuffix.org/. To create indices and data\n");
printf("file, do the following:\n\n");
- printf(" wget https://publicsuffix.org/list/effective_tld_names.dat -O effective_tld_names.dat\n");
- printf(" grep '^[^\\/\\/]' effective_tld_names.dat > effective_tld_names.dat.trimmed\n");
- printf(" %s effective_tld_names.dat.trimmed effective_tld_names.dat.qt\n\n", argv[0]);
- printf("Now copy the data from effective_tld_names.dat.qt to the file src/corelib/io/qurltlds_p.h in your Qt repo\n\n");
- exit(1);
+ printf(" wget https://publicsuffix.org/list/public_suffix_list.dat -O public_suffix_list.dat\n");
+ printf(" grep -v '^//' public_suffix_list.dat | grep . > public_suffix_list.dat.trimmed\n");
+ printf(" ./%s public_suffix_list.dat.trimmed public_suffix_list.cpp\n\n", argv[0]);
+ printf("Now replace the code in qtbase/src/corelib/io/qurltlds_p.h with public_suffix_list.cpp's contents\n\n");
+ return 1;
}
QFile file(argv[1]);
QFile outFile(argv[2]);