Fix dead links in winning entries in years.html
Some of the links had to be manually updated (including by downloading
from the IOCCC website some missing files which I'm not even sure how
they were missing from the repo) and others were fixed via sgit. To
demonstrate its usage the following command removes from years.html the
patterns 'hint.html' and '\.hint' with tracing enabled and verbosity of
level 2. Notice how in this case the patterns are just deleted but one
could substitute it for something else or run other sed commands as
well. There was no need to specify sed options or the -I option (which
means don't use the -i option to sed). If this change needed to be done
in the entire repo 'years.html' could have been instead just '.' (if at
the root directory of the repo). One can specify more than one glob just
as one can specify more than one command (as of the bug fix in commit
05e83b60ff).
$ bin/sgit -x -v 2 -e '/hint.html/d' -e '/\.hint/d' years.html
+ getopts :hVv:xIo:s:e: flag
+ case "$flag" in
+ VERBOSITY=2
+ getopts :hVv:xIo:s:e: flag
+ case "$flag" in
+ SED_COMMANDS+=(-e "$OPTARG")
+ getopts :hVv:xIo:s:e: flag
+ case "$flag" in
+ SED_COMMANDS+=(-e "$OPTARG")
+ getopts :hVv:xIo:s:e: flag
+ shift 7
+ [[ -z -e /hint.html/d -e /\.hint/d ]]
+ [[ -z /opt/local/bin/sed ]]
+ [[ ! -f /opt/local/bin/sed ]]
+ [[ ! -x /opt/local/bin/sed ]]
+ [[ 2 -eq 0 ]]
+ git status
+ status=0
+ [[ 0 -ne 0 ]]
+ [[ 2 -gt 1 ]]
+ echo 'debug[2]: sed commands: -e /hint.html/d -e /\.hint/d'
debug[2]: sed commands: -e /hint.html/d -e /\.hint/d
+ [[ 2 -gt 1 ]]
+ echo 'debug[2]: looping through all globs'
debug[2]: looping through all globs
+ i=0
+ [[ 0 -le 2 ]]
+ [[ 2 -gt 1 ]]
+ echo 'debug[2]: found glob: README.md'
debug[2]: found glob: README.md
+ [[ 2 -ge 1 ]]
+ [[ -z '' ]]
+ [[ -n '' ]]
+ echo 'debug[1]: about to run: git ls-files README.md | xargs /opt/local/bin/sed -i"" -e /hint.html/d -e /\.hint/d'
debug[1]: about to run: git ls-files README.md | xargs /opt/local/bin/sed -i"" -e /hint.html/d -e /\.hint/d
+ [[ -z '' ]]
+ [[ -n '' ]]
+ git ls-files README.md
+ xargs /opt/local/bin/sed -i -e /hint.html/d -e '/\.hint/d'
+ (( i++ ))
+ shift 1
+ [[ 1 -le 1 ]]
+ [[ 2 -gt 1 ]]
+ echo 'debug[2]: found glob: years.html'
debug[2]: found glob: years.html
+ [[ 2 -ge 1 ]]
+ [[ -z '' ]]
+ [[ -n '' ]]
+ echo 'debug[1]: about to run: git ls-files years.html | xargs /opt/local/bin/sed -i"" -e /hint.html/d -e /\.hint/d'
debug[1]: about to run: git ls-files years.html | xargs /opt/local/bin/sed -i"" -e /hint.html/d -e /\.hint/d
+ [[ -z '' ]]
+ [[ -n '' ]]
+ git ls-files years.html
+ xargs /opt/local/bin/sed -i -e /hint.html/d -e '/\.hint/d'
+ (( i++ ))
+ shift 1
+ [[ 2 -le 0 ]]
This commit is contained in:
1 parent
05e83b60ff
commit
017230874f
1 file changed
+8
-261