• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -x
2
3# $1 Path to the new version.
4# $2 Path to the old version.
5
6# We only want a few files from the archive, so delete any files that weren't
7# in the old version.  Start with deleting whole directories first.
8find $1 -maxdepth 1 -type d -printf "%P\n" | while read f; do
9  if [ ! -d "$2/$f" ]; then
10      rm -rf $1/$f
11  fi
12done
13
14find $1 -printf "%P\n" | while read f; do
15  if [ ! -e "$2/$f" ]; then
16      rm -rf $1/$f
17  fi
18done
19
20# Copy over the android directory
21cp -r $2/android $1/android
22