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