Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 0.68 kb
# This takes all .html files and moves them into a folder based on their tag and with sensible file names
redo-ifchange all
ls *.html | while read line; do
tag="$(echo "$line" | sed 's/.*\.\([^.]*\)\.html$/\1/')"
filename="$(basename "$line" ".$tag.html")"
mkdir -p "$tag"
cp "$line" "$tag/$filename.html"
done
# And move the index files in too
ls *.tagindex | while read line; do
tag="$(basename "$line" ".tagindex")"
# Just a precaution
mkdir -p "$tag"
cp "$line" "$tag/index.html"
done
# And move the feed files in too
ls *.tagfeed | while read line; do
tag="$(basename "$line" ".tagfeed")"
# Just a precaution
mkdir -p "$tag"
cp "$line" "$tag/feed.atom"
done
Jump to Line
Something went wrong with that request. Please try again.