#!/bin/bash set -eu input=$1 output=$2 parameters=${input/%.html/.sh} if ! test -f ${parameters} then cp ${input} ${output} exit fi cp template.html ${output} transform-li-current-a () { local old="