~hikiko/unity-control-center/unity-control-center.display-combo

« back to all changes in this revision

Viewing changes to update-from-gsd.sh

  • Committer: Bastien Nocera
  • Date: 2012-04-19 11:01:14 UTC
  • Revision ID: git-v1:66ae752c88ab90c108146df49b78bc778e47d163
wacom: Move update-from-gsd.sh to root

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
function die() {
 
4
  echo $*
 
5
  exit 1
 
6
}
 
7
 
 
8
if test -z "$DIR"; then
 
9
   echo "Must set DIR"
 
10
   exit 1
 
11
fi
 
12
 
 
13
if test -z "$FILES"; then
 
14
   echo "Must set FILES"
 
15
   exit 1
 
16
fi
 
17
 
 
18
for FILE in $FILES; do
 
19
  if cmp -s $DIR/$FILE $FILE; then
 
20
     echo "File $FILE is unchanged"
 
21
  else
 
22
     cp $DIR/$FILE $FILE || die "Could not move $DIR/$FILE to $FILE"
 
23
     echo "Updated $FILE"
 
24
     git add $FILE
 
25
  fi
 
26
done