#!/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..."
tar xf $INSTALL

mkdir -p "$INSTALL_TO"
cat LICENSE
rm LICENSE
mv mdtohtml $INSTALL_TO
