#! /bin/bash

out=amf_demo.tgz

if ! test -e amf_demo; then
	echo "can not find amf_demo, please build first"
	exit 1
fi

mkdir -p opt/amf_demo
cp amf_demo opt/amf_demo
cp  amf_demo_script opt/amf_demo
tar cvfz $out opt >& /dev/null

if test $? -eq 0; then
	echo "successfully created $out, extract this archive at the root of your target filesystem"
fi

rm -rf opt
