improved deployment script: create target directory if it doesn't exist

This commit is contained in:
Manuel Friedli 2016-08-15 20:37:48 +02:00
parent 1a4e8f1c8c
commit bc6cd67d54

View file

@ -14,6 +14,10 @@ case "${TARGET}" in
;; ;;
esac esac
if [[ ! -d "${destination}" ]] ; then
mkdir -p "${destination}" || echo "Failed to create target directory for deployment!"
fi
rm -rf "${destination}/*" rm -rf "${destination}/*"
rm -rf "${destination}/.??*" rm -rf "${destination}/.??*"
cp -a dencode.css dencode.js index.html quoted-printable.js utf8.js "${destination}" cp -a dencode.css dencode.js index.html quoted-printable.js utf8.js "${destination}"