Added update-readmes.sh to change .zip links in README.mds.

This commit is contained in:
badlogic 2017-07-12 11:18:41 +02:00
parent fc72709c48
commit ec2393d61f

23
update-readmes.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
# Needs gnu-sed on macOS for inplace replacement
# brew install --with-default-names gnu-sed
set -e
if [ -z "$1" ]
then
echo "Usage: ./update-readmes.sh <from-branch> <to-branch>"
echo "Example: ./update-readmes.sh 3.6 3.7"
exit
fi
if [ -z "$2" ]
then
echo "Usage: ./update-readmes.sh <from-branch> <to-branch>"
echo "Example: ./update-readmes.sh 3.6 3.7"
exit
fi
find . -type f -name 'README.md' | while read line; do
echo "Updating $line"
sed -i "s,https://github.com/EsotericSoftware/spine-runtimes/archive/$1.zip,https://github.com/EsotericSoftware/spine-runtimes/archive/$2.zip,g" $line
done