view tools/touch_suffixes.sh @ 460:bf8653674ede

Status LEDs preinit rc.d script.
author Aleksandr Rybalko <ray@ddteam.net>
date Mon, 24 Sep 2012 13:59:56 +0300
parents dbf0b2cff3af
children
line wrap: on
line source
#!/bin/sh

TARGET=$1
echo ${TARGET}

DIRNAME=`dirname ${TARGET}`
FILENAME=`basename ${TARGET}`
SUFFIXES=`echo ${FILENAME} | sed 's/\\./ /g'`

FILE=""
for p in ${SUFFIXES} ; do
	if [ -z "${FILE}" ]; then
		FILE="${p}"
		continue;
	fi
	FILE="${FILE}.${p}"
	if [ ! -f ${DIRNAME}/${FILE} ]; then
		# Make it very old
		touch -t 197000000000 ${DIRNAME}/${FILE}
	fi
done


exit 0