From ec2393d61f9b2d32a1837fcb363a260a262f100b Mon Sep 17 00:00:00 2001 From: badlogic Date: Wed, 12 Jul 2017 11:18:41 +0200 Subject: [PATCH] Added update-readmes.sh to change .zip links in README.mds. --- update-readmes.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 update-readmes.sh diff --git a/update-readmes.sh b/update-readmes.sh new file mode 100755 index 000000000..bc72ab350 --- /dev/null +++ b/update-readmes.sh @@ -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 " + echo "Example: ./update-readmes.sh 3.6 3.7" + exit +fi + +if [ -z "$2" ] + then + echo "Usage: ./update-readmes.sh " + 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 \ No newline at end of file