Categories...
Tue, 21 Jan 2003
Blosxom 0+6i-b2 setup
No change compared to 0+5i version. It ran Out Of the Box, after I made the same changes.
I added a small script, as I really want some files to keep the same date.
This script looks for files (in blog directories) which names look like a date,
then it changes the date of these files with the name itself.
It runs every hour, and could be used with other versions of blosxom as well.
Here is the source of this file:
#! /bin/sh for i in `find ./blog -name '*.txt' -print` do DATE=`expr match $i '.*\([0-9]\{12\}\).txt'` if [ -z ${DATE} ] then DATE=`expr match $i '.*\([0-9]\{8\}\).txt'` [ ${DATE} ] && "DATE=${DATE}1200" fi [ ${DATE} ] && touch -t ${DATE} "$i" done
This script accepts files like "*DATE.txt", where DATE can be in both YYYYMMDDhhmm.txt or YYYYMMDD.txt formats. In the latter case, a default of 12:00 is used for the time.