#!/bin/bash -e
d=e8-update
test -d src/e8      # fail if this isn't run from @topsrcdir@
mkdir -p $d
cd $d
rm -rf *            # safe: we're under -e, so mkdir & cd succeded
curl https://tangentsoft.com/e8/tarball | tar -xf -
mv doc/manual.md ../doc/e8-manual.md
mv doc/manual-pdf.css ../doc/e8-manual-pdf.css
mv doc/graphics/e8-buffer.svg ../doc/graphics
mv tools/* ../tools
rm ../tools/splitpal    # we don't use this
rm COPYING.md           # duplicate: SIMH-LICENSE.md
mv *.{md,pa} ../src/e8
