#!/bin/sh -eu

MNT_NEW=/mnt/$$

echo "Unsquashing installer..."

mv "$DEST"/altinst "$DEST"/altinst.squash
mkdir -p "$MNT_NEW"
mount -o loop -t squashfs "$DEST"/altinst.squash "$MNT_NEW"
cp -a "$MNT_NEW" "$DEST"/altinst
umount "$MNT_NEW"
rm -rf "$MNT_NEW"

echo "Done."

