set -e
# copy only nessesary files

echo "Copying files..."
mkdir -p dist
cp -r *.php sql-updates/ adm/ dist/

set +e
echo "Downloading phpLiteAdmin"
wget -nc https://bitbucket.org/phpliteadmin/public/downloads/phpLiteAdmin_v1-9-8-2.zip
unzip phpLiteAdmin_v1-9-8-2.zip phpliteadmin.php
mv phpliteadmin.php dist/adm

echo "Cleaning up"

rm -f phpLiteAdmin_v1-9-8-2.zip 
set -e
rm -f dist/k-api.updates-status.php

echo "


Done."