#! /usr/bin/env bash
DL_URL="${1}"
DL_FILENAME="${2:-${DL_URL##*/}}"
DL_DIR=$(mktemp -dt)
cd "$DL_DIR"
# Download the .deb file
wget "$DL_URL"
# Install the package
sudo dpkg -i "${DL_FILENAME}"
# Clean up
rm "${DL_FILENAME}"
cd /
rmdir "$DL_DIR"