#!/bin/sh

# This script touches each of the items in /etc/changes.manifiest, IFF
# the item is not a soft link.

TouchItem() {
  if [ -L "$1" ]; then
    return
  fi

  if [ -d "$1" ]; then
    for subitem in "$1"/*; do
      TouchItem "$subitem"
    done
    echo touch "$1"
  fi

  if [ -f "$1" ]; then
    echo touch "$1"
  fi
}

# Start out with the contents of /etc/changes.manifest

for item in `cat /etc/changes.manifest`; do
  TouchItem "$item"
done
