#!/bin/bash OUTDIR=$1 if [[ -z ${OUTDIR} ]]; then echo "Usage: $0 " >&2 exit 1 fi IRC='ircs://irc.libera.chat/#gentoo-python' irk "${IRC}" - <<<$'\0' gpy-list-pkg-impls > "${OUTDIR}"/python-pkg-impls.txt.new || exit 1 while read -r x; do irk "${IRC}" "${x}" done < <(git diff --no-index -s --word-diff -U0 "${OUTDIR}"/python-pkg-impls.txt{,.new} | tail -n +5 | grep -v '^@@') mv "${OUTDIR}"/python-pkg-impls.txt{.new,}