#!/bin/sh # generate a Atom feed from a directory, recursively # using POSIX sh # AUTHOR: Case Duckworth # LICENSE: MIT usage() { cat < $FEED_TITLE $FEED_SUBTITLE $FEED_ID $ENTRY_URL $ENTRY_TITLE $ENTRY_SUMMARY $ENTRY_UPDATED $ENTRY_AUTHOR END } main() { CONFIGFILE="$PWD/gemshimfeed.conf.sh" case "$1" in -h) usage exit 0 ;; -c) CONFIGFILE="$2" shift 2 ;; esac . "$CONFIGFILE" || : atom_header for DIR; do for entry in $(recent_files "$DIR" -type f); do if skip_file "$entry"; then continue; fi atom_entry "$entry" done done atom_footer }