#!/bin/sh

SOURCE_DATE_EPOCH=1575540319

# Must have branch feature/17152-port-to-moo checked out or merged in
PERL5LIB_CHECKOUT=/home/intrigeri/tails/perl5lib/git

ISOS=/srv/ftp/intrigeri/iso/tails

for i in 1 2 ; do
   sudo LC_ALL=C SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" PERL5LIB="${PERL5LIB_CHECKOUT}/lib" \
        ./bin/tails-create-iuk \
        --union-type overlayfs \
        --squashfs-diff-name test.squashfs \
        --old-iso "$ISOS"/tails-amd64-4.0/tails-amd64-4.0.iso \
        --new-iso "$ISOS"/dev/tails-amd64-feature_17219-replace-torbirdy-4.1-20191201T0641Z-3f6b3e2803.iso \
        --outfile test$i.iuk
done && sudo cmp test*.iuk
