comparison ibmscripts/ldcc @ 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
65 wine 'I:\\ibmcppw\\bin\\icc.exe' /Gm '/B"PM:PM"' /Q+ \ 65 wine 'I:\\ibmcppw\\bin\\icc.exe' /Gm '/B"PM:PM"' /Q+ \
66 /Fm$MAPFILE /Fe$OUTPUT $FILES 66 /Fm$MAPFILE /Fe$OUTPUT $FILES
67 echo "@@@Exit $?" 67 echo "@@@Exit $?"
68 ) 2>&1 | tr -d '\r' | tee "$LOGFILE" | ( 68 ) 2>&1 | tr -d '\r' | tee "$LOGFILE" | (
69 if [ $QUIET = 1 ]; then 69 if [ $QUIET = 1 ]; then
70 #
71 # The compiler prints its copyright banner every time you run
72 # it, and there's apparently no way to fully suppress this.
73 # (That is, I think the /Q+ flag above silences some messages
74 # but not all of them.) So, since this is extremely annoying and
75 # interferes with development, delete the strings from the
76 # output. Obfuscate the regexps slightly, because I want them to
77 # be precise (no other messages should be suppressed) but I also
78 # don't want to be harassed by source-scanning bots or (perhaps)
79 # clueless lawyers that think they're actual IBM copyright
80 # notices. I wrote this script; it's not IBM's. (Or Microsoft's,
81 # either.)
82 #
83 # Note that the strings with the first character missing are not
84 # an accident. That actually happens.
85 #
70 sed ' 86 sed '
71 /^IBM(R) VisualAge(TM) for C++ for Windows(R), Version 3\.5$/d 87 /^[I][B][M](.) VisualAge(..) for C++ for Windows(.), Version 3\.5$/d
72 /^- Licensed Materials - Program-Property of IBM$/d 88 /^- [L]icensed [M]aterials - Program-[P]roperty of [I][B][M]$/d
73 /^(C) Copyright IBM Corp. 1991, 1996 - All Rights Reserved.$/d 89 /^(.) [C]opyright [I][B][M] [C]orp. 1991, 1996 - [A]ll [R]ights [R]eserved.$/d
74 /^BM(R) Linker for Windows(R), %0$/d 90 /^[B][M](.) Linker for Windows(.), %0$/d
75 /^ersion 02.01.r2a_WTC354e *$/d 91 /^ersion 02.01.r2a_WTC354e *$/d
76 /^opyright (C) IBM Corporation 1988, 1998\.$/d 92 /^[o]pyright (.) [I][B][M] [C]orporation 1988, 1998\.$/d
77 /^Copyright (C) Microsoft Corp\. 1988, 1989\.$/d 93 /^[C]opyright (.) [M]icrosoft [C]orp\. 1988, 1989\.$/d
78 /^All rights reserved\.$/d 94 /^[A]ll [r]ights [r]eserved\.$/d
79 ' 95 '
80 else 96 else
81 cat 97 cat
82 fi 98 fi
83 ) | awk ' 99 ) | awk '