File genspec.sh of Package LHAPDF-datasets

#!/bin/bash

test $# -eq 1 || { echo "Error: One input setname expected." ; exit 1 ;  }

setname=$1
version=`date -u +%Y.%m.%d~%H%M%S`
tempspec=LHAPDF-datasets
outspec=LHAPDF-PDFset-${setname}
sed -E "s/@setname@/${setname}/g" ${tempspec}.spec.in > ${outspec}.spec
sed -E -i "s/@version@/${version}/g" ${outspec}.spec
cp ${tempspec}.changes ${outspec}.changes