Skip to content

Instantly share code, notes, and snippets.

@jb55
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jb55/bf4b360d8e7fabea26a4 to your computer and use it in GitHub Desktop.
Save jb55/bf4b360d8e7fabea26a4 to your computer and use it in GitHub Desktop.
Updating your travis png's to svg's
#!/bin/bash
README_NAME="Readme.md"
find . -name ".travis.yml" -maxdepth 3 -exec dirname {} \; > travis_dirs
find . -name "$README_NAME" -maxdepth 3 -exec sed -i "" "s/\.png/\.svg/" {} \;
for dir in $(<travis_dirs); do
cd $dir
git add "$README_NAME"
git commit -m "travis: png to svg"
git push origin master
cd -
done
@jb55
Copy link
Author

jb55 commented May 1, 2014

I didn't have any pngs other than the travis one in my readmes so this is not robust at all if you have other PNGs in your readmes. Just need to update the sed replace... meh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment