Skip to content

Instantly share code, notes, and snippets.

@trepmal
Last active March 8, 2016 21:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trepmal/fe8fe06864192b6b001f to your computer and use it in GitHub Desktop.
Save trepmal/fe8fe06864192b6b001f to your computer and use it in GitHub Desktop.
regrab files that don't match checksums
#!/bin/bash
vers=$(wp core version)
for f in $(wp core verify-checksums --no-color 2>&1 >/dev/null | cut -d: -f3)
do
if [[ `curl -Is http://core.svn.wordpress.org/tags/$vers/$f | grep "200 OK"` ]]
then
echo "Fetching $f"
curl -so $f http://core.svn.wordpress.org/tags/$vers/$f
else
echo "Could not fetch: http://core.svn.wordpress.org/tags/$vers/$f"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment