complete prepare-icat.sh