#!/bin/sh

#	Written by Paul Irofti <paul@irofti.net>, Public Domain

PWD=`pwd`
ITEM=`basename "${PWD}"`
COLL=$1

DIR=`pwd | sed s,[\]\[_a-zA-Z/\-]*/documents,/mnt/us/documents,`

echo ${DIR}

FILE=`ls | head -1`
LAST=${DIR}/${FILE}
DATE=`date +"%a %b %d %T %Z %Y"`

echo "#${DATE}" > "${ITEM}.${COLL}_save"
echo "LAST=${LAST}" >> "${ITEM}.${COLL}_save"
echo -en "\x00" > "${ITEM}.${COLL}"
