Created
September 16, 2012 22:42
-
-
Save Neil-Smithline/3734671 to your computer and use it in GitHub Desktop.
Octopress 2.0 Sitemap Merger
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HEADER=$(cat <<EOF | |
<?xml version='1.0' encoding='UTF-8'?> | |
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'> | |
EOF) | |
TRAILER='</urlset>' | |
echo "$HEADER" | |
cat "$@" | egrep -v '(xml version=|urlset xmlns=|</urlset>)' | |
echo "$TRAILER" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation about this Gist can be found in Octopress issue 708.