sig-cloud-instance-images/tools/pkdiff.sh
Neil Hanlon 9009e76f10
Merge imagefactory into main (#7)
* Build images using imagefactory, spawned by Makefile on Gitlab runners weekly on Sundays at 00:00 UTC
* Add details on creating builds to README
* add package diff script
* Don't include architecture in filename, so that it's easier to make images.. The compressed build artifacts are already named with the architecture
2022-03-14 17:22:26 -04:00

21 lines
394 B
Bash
Executable File

#!/bin/sh
base="$1"
compare="${2-$(git rev-parse --abbrev-ref HEAD)}"
file=${3:-packages.txt}
usage () {
echo "$0: <from> [to] (defaults to current HEAD)"
exit
}
if [[ -z $base || -z $compare ]]; then
usage
fi
git diff "${base}:${file}" "${compare}:${file}" \
| grep -E '^([+-]\w)' \
| awk '!(NR%2){print substr(p,2,length(p)),"=>",substr($0,2,length($0))}{p=$0}'\
| column -t