#!/bin/sh set -u set -e main() { if [ $# -lt 1 ]; then printf "Give a package name.\n" exit 1 fi package=$1 shift if [ $# -ne 0 ]; then printf "Unknown parameter %s\n" "$1" exit 1 fi mkdir a mkdir b mypath="$(./pre-inst-env guix build --no-substitutes $package)" \ && rsync -rLptgoD "$mypath" ./a \ && guix gc -d "$mypath" \ && mypath="$(./pre-inst-env guix build --no-substitutes $package)" \ && rsync -rLptgoD "$mypath" ./b \ && guix gc -d "$mypath" \ && diffoscope --html ./report ./a ./b } main "$@"