#!/bin/sh importmap="$1" tmp="$(mktemp)" awk ' BEGIN { s="" e="" } FILENAME != "index.html" { d=d $0 "\n" next } $0 == s || $0 == e { print } $0 == s,$0 == e { if(d) { print "" } next } { print } ' "$importmap" index.html > "$tmp" \ && mv "$tmp" index.html