]> git.cameronkatri.com Git - apple_cmds.git/blob - file_cmds/tests/touch.sh
doc_cmds: Update to 53.100.1
[apple_cmds.git] / file_cmds / tests / touch.sh
1 #!/bin/sh
2
3 file_name=`mktemp /tmp/XXXXXX`
4 file_ctime=`/usr/bin/stat -f%c ${file_name}`
5
6 /usr/bin/touch $file_name
7 file_mtime=`/usr/bin/stat -f%m ${file_name}`
8
9 if [ "$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
12 fi
13
14 exit 0