summaryrefslogtreecommitdiff
path: root/post_update.sh
blob: 6f15e8f2209df0a7aa26f38c21f7d664af3127bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash -x

# $1 Path to the new version.
# $2 Path to the old version.

# We only want a few files from the archive, so delete any files that weren't
# in the old version.  Start with deleting whole directories first.
find $1 -maxdepth 1 -type d -printf "%P\n" | while read f; do
  if [ ! -d "$2/$f" ]; then
      rm -rf $1/$f
  fi
done

find $1 -printf "%P\n" | while read f; do
  if [ ! -e "$2/$f" ]; then
      rm -rf $1/$f
  fi
done

# Copy over the android directory
cp -r $2/android $1/android