#!/bin/sh
wget https://github.com/twbs/bootstrap/releases/download/v5.1.3/bootstrap-5.1.3-dist.zip
unzip bootstrap-*-dist.zip
mv bootstrap-*-dist/js/bootstrap.bundle.js .
rm -rf bootstrap-*-dist.zip bootstrap-*-dist

if ! which terser ; then
    echo "You need to \`apt install uglifyjs.terser\` to use this script"
    exit 1
fi

terser --compress --source-map --mangle --output bootstrap.bundle.min.js -- bootstrap.bundle.js 
