From 3eea219548e84efdbc3148ce378fcba865f97a01 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Fri, 6 Dec 2013 14:15:43 -0800 Subject: Add basic source formatting tools --- tools/maybe-mv | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 tools/maybe-mv (limited to 'tools/maybe-mv') 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 -- cgit v1.2.3-70-g09d2