#!/bin/sh set -xe rm -Rf xlib-tutorial test -e xlib-tutorial.tar.gz || \ wget https://tronche.com/gui/x/xlib-tutorial/xlib-tutorial.tar.gz tar xzvf xlib-tutorial.tar.gz ( cd xlib-tutorial # Probably requires GNU sed sed -i -E 's_(HREF=")/gui/x/xlib/([^"]+")_\1../xlib-manual/\2_g' *.html sed -i -E 's_(Unlike what appears in the )(dialog)_\1\2_' 2nd-program-anatomy.html sed -i -E 's_(__' index.html for i in screen-and-root-window.html window-manager.html do echo 'This file never existed.' >"$i" done )