while read name ; do
# Find out which deletions apply.
- grep '^<!-- START DELETION' ../$name.html \
- | grep -v "$name" \
- | sed 's%^<!-- START DELETION \([0-9][0-9]\),.*$%\1%' > $list
- echo $name
+ grep '^<!-- START DELETION' ../$name.html |
+ grep -v "$name" > $list || true
+ sed -i 's%^<!-- START DELETION \([0-9][0-9]\),.*$%\1%' $list
# Delete.
while read deletion; do
sed -i "/^<!-- START DELETION $deletion/, \
while read name ; do
# Find out which deletions apply.
- grep '^<!-- START DELETION' ../$name.html \
- | grep -v "$name" \
- | sed 's%^<!-- START DELETION \([0-9][0-9]\),.*$%\1%' > $list
- echo $name
+ grep '^<!-- START DELETION' ../$name.html |
+ grep -v "$name" > $list || true
+ sed -i 's%^<!-- START DELETION \([0-9][0-9]\),.*$%\1%' $list
# Delete.
while read deletion; do
sed -i "/^<!-- START DELETION $deletion/, \
set -o pipefail
function close_term () {
- echo;
- echo '*** Close the terminal window or press Return.';
- exit $1
+ printf '\n%s' '*** Close the terminal window or press Return.'; read OK
+ test -z "$OK" && exit $1
}
# Create temporary files.
while read name ; do
# Find out which deletions apply.
- grep '^<!-- START DELETION' ../$name.html \
- | grep -v "$name" \
- | sed 's%^<!-- START DELETION \([0-9][0-9]\),.*$%\1%' > $list
- echo $name
+ grep '^<!-- START DELETION' ../$name.html |
+ grep -v "$name" > $list || true
+ sed -i 's%^<!-- START DELETION \([0-9][0-9]\),.*$%\1%' $list
# Delete.
while read deletion; do
sed -i "/^<!-- START DELETION $deletion/, \