comparison ibmscripts/shldcc @ 24:a4899cdfc2d6 default tip

Obfuscate the regexps to strip off the IBM compiler's copyright banners. I don't want bots scanning github to think they're real copyright notices because that could cause real problems.
author David A. Holland
date Mon, 13 Jun 2022 00:40:23 -0400
parents 13d2b8934445
children
comparison
equal deleted inserted replaced
23:cac4c76600eb 24:a4899cdfc2d6
54 wine 'I:\\ibmcppw\\bin\\icc.exe' /Ge- @.tmp /Q+ \ 54 wine 'I:\\ibmcppw\\bin\\icc.exe' /Ge- @.tmp /Q+ \
55 /Fm$MAPFILE /Fe$OUTPUT $FILES 55 /Fm$MAPFILE /Fe$OUTPUT $FILES
56 echo "@@@Exit $?" 56 echo "@@@Exit $?"
57 ) 2>&1 | tr -d '\r' | tee "$LOGFILE" | ( 57 ) 2>&1 | tr -d '\r' | tee "$LOGFILE" | (
58 if [ $QUIET = 1 ]; then 58 if [ $QUIET = 1 ]; then
59 #
60 # The compiler prints its copyright banner every time you run
61 # it, and there's apparently no way to fully suppress this.
62 # (That is, I think the /Q+ flag above silences some messages
63 # but not all of them.) So, since this is extremely annoying and
64 # interferes with development, delete the strings from the
65 # output. Obfuscate the regexps slightly, because I want them to
66 # be precise (no other messages should be suppressed) but I also
67 # don't want to be harassed by source-scanning bots or (perhaps)
68 # clueless lawyers that think they're actual IBM copyright
69 # notices. I wrote this script; it's not IBM's. (Or Microsoft's,
70 # either.)
71 #
72 # Note that the strings with the first character missing are not
73 # an accident. That actually happens.
74 #
59 sed ' 75 sed '
60 /^IBM Librarian for Windows (TM) Version 0.00.04 cc_WTC357f $/d 76 /^[I][B][M] Librarian for Windows (..) Version 0.00.04 cc_WTC357f $/d
61 /^(C) Copyright IBM Corporation, 1991, 1996\.$/d 77 /^(.) [C]opyright [I][B][M] [C]orporation, 1991, 1996\.$/d
62 /^(C) Copyright Microsoft Corp\., 1988, 1989\.$/d 78 /^(.) [C]opyright [M]icrosoft [C]orp\., 1988, 1989\.$/d
63 /^Licensed Materials - Property of IBM - All Rights Reserved\.$/d 79 /^[L]icensed [M]aterials - [P]roperty of [I][B][M] - [A]ll [R]ights [R]eserved\.$/d
64 80
65 /^IBM(R) VisualAge(TM) for C++ for Windows(R), Version 3\.5$/d 81 /^[I][B][M](.) VisualAge(..) for C++ for Windows(.), Version 3\.5$/d
66 /^- Licensed Materials - Program-Property of IBM$/d 82 /^- [L]icensed [M]aterials - Program-[P]roperty of [I][B][M]$/d
67 /^(C) Copyright IBM Corp. 1991, 1996 - All Rights Reserved.$/d 83 /^(.) [C]opyright [I][B][M] [C]orp. 1991, 1996 - [A]ll [R]ights [R]eserved.$/d
68 84
69 /^BM(R) Linker for Windows(R), %0$/d 85 /^[B][M](.) Linker for Windows(.), %0$/d
70 /^ersion 02.01.r2a_WTC354e *$/d 86 /^ersion 02.01.r2a_WTC354e *$/d
71 /^opyright (C) IBM Corporation 1988, 1998\.$/d 87 /^[o]pyright (.) [I][B][M] [C]orporation 1988, 1998\.$/d
72 /^Copyright (C) Microsoft Corp\. 1988, 1989\.$/d 88 /^[C]opyright (.) [M]icrosoft [C]orp\. 1988, 1989\.$/d
73 /^All rights reserved\.$/d 89 /^[A]ll [r]ights [r]eserved\.$/d
74 ' 90 '
75 else 91 else
76 cat 92 cat
77 fi 93 fi
78 ) | awk ' 94 ) | awk '