seisobs-webapp/scripts/patchVersion.sh

17 lines
333 B
Bash
Raw Normal View History

2021-10-27 10:02:12 +02:00
#!/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