#!/bin/sh
set -e
echo "Finalising images .."
SRC=/var/lib/adsrootbuilder
DEST=/var/lib/adsrootbuilder/ads-cramfs
mkdir -p $DEST
mv $SRC/cramfs_root.img.tar $DEST/debian-cramfs.tar
gzip $DEST/debian-cramfs.tar
mv $SRC/cramfs_root.img $DEST/cramfs.img
echo ""
echo "All necessary generated images are in $DEST"
echo "Copy to a compact flash card containing the necessary bootloader"
echo "config files to boot the cramfs image."
echo ""
echo "Note that your system is still configured to develop a cramfs."
echo "To return it to its original configuration, run \"cramfs-configure off\""
