]> git.saurik.com Git - apple/file_cmds.git/blame - tests/touch.sh
file_cmds-321.100.10.0.1.tar.gz
[apple/file_cmds.git] / tests / touch.sh
CommitLineData
867b3d41
A
1#!/bin/sh
2
3file_name=`mktemp /tmp/XXXXXX`
4file_ctime=`/usr/bin/stat -f%c ${file_name}`
5
6/usr/bin/touch $file_name
7file_mtime=`/usr/bin/stat -f%m ${file_name}`
8
9if [ "$file_ctime" -gt "$file_mtime" ]; then
10 echo "file's mod time ($file_mtime) should be later than the file's creation time ($file_ctime)"
11 exit 1
12fi
13
14exit 0