#!/usr/bin/bash
INSTALL=$(find ~/Downloads/mdtohtml*.gz)
INSTALL_TO="$HOME/bin"
if [ ! -f $INSTALL ]; then
  echo "~/Downloads is missing instal file from https://github.com/sgaunet/mdtohtml/releases"
  exit 1
fi
echo "Installing from $INSTALL..."
cd /tmp
tar xf $INSTALL

mkdir -p "$INSTALL_TO"
cat LICENSE
rm /tmp/LICENSE
rm /tmp/README.md
mv mdtohtml $INSTALL_TO
