Organized directory structure.
[agg.git] / src / nomtime
bloba6744a8c204547c38a80de97e5d7be89813c73c8
1 #!/bin/sh
2 # Copyright (C) 2011 Andreas Waidler <arandes@programmers.at>
4 # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
5 # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7 # 0. You just DO WHAT THE FUCK YOU WANT TO.
9 # Runs $1 with $2 as parameter while ensuring that the
10 # mtime of the parent directory of $2 is not changed.
12 DIR="`dirname \"$2\"`"
13 MTIME="`stat -c %y \"$DIR\"`"
14 "$1" "$2"
15 res=$?
16 touch -md "$MTIME" "$DIR"
18 exit $res