adding script to patch version strings

version strings are "VVVVV"
This commit is contained in:
Kasper D. Fischer 2021-10-26 23:28:42 +02:00
parent 788f4fa091
commit 5455f182d7

17
scripts/patchVersion.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash -x
# 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