Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 18 lines (16 sloc) 0.335 kb
511dc44 initial import
Laurent Sansonetti authored
1 #!/bin/sh
2 # usage: ifchange target temporary
3
4 target="$1"
5 temp="$2"
6 if [ "$temp" = - ]; then
7 temp="tmpdata$$.tmp~"
8 cat > "$temp" || exit $?
9 trap 'rm -f "$temp"' 0
10 fi
11 if cmp "$target" "$temp" >/dev/null 2>&1; then
12 echo "$target unchanged"
13 rm -f "$temp"
14 else
15 echo "$target updated"
16 mv -f "$temp" "$target"
17 fi
Something went wrong with that request. Please try again.