diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-12-06 14:15:43 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-12-06 14:15:49 -0800 |
commit | 3eea219548e84efdbc3148ce378fcba865f97a01 (patch) | |
tree | 6ece594f60ddff038cf9c1d94b99d8d66a00bc20 /tools/maybe-mv | |
parent | 1458563f00deebbbcf3e8049dc90157fb825fae3 (diff) | |
download | tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.tar.gz tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.tar.bz2 tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.tar.xz tmwa-3eea219548e84efdbc3148ce378fcba865f97a01.zip |
Add basic source formatting tools
Diffstat (limited to 'tools/maybe-mv')
-rwxr-xr-x | tools/maybe-mv | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/maybe-mv b/tools/maybe-mv new file mode 100755 index 0000000..725b86b --- /dev/null +++ b/tools/maybe-mv @@ -0,0 +1,8 @@ +#!/bin/bash -eu +# Replace one file with another, but maybe don't update the timestamp +if cmp -s "$1" "$2" +then + rm "$1" +else + mv "$1" "$2" +fi |