seisobs-webapp/scripts/patchVersion.sh

17 lines
333 B
Bash
Executable File

#!/bin/bash
# version: VVVVV
if [ $# -le 1 ] ; then
echo usage: ${0} version_string files ...
exit 0
fi
version="$1"
shift
files="$*"
echo ${version} ${files}
which sponge > /dev/null || ( echo "sponge util must be installed" ; exit 0 )
for file in ${files}; do
sed "s/V\{5\}/${version}"/ ${file} | sponge ${file}
done