Colin Cross | 3f150c1 | 2021-09-08 14:59:46 -0700 | [diff] [blame] | 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. |
| 8 | find $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 |
| 12 | done |
| 13 | |
| 14 | find $1 -printf "%P\n" | while read f; do |
| 15 | if [ ! -e "$2/$f" ]; then |
| 16 | rm -rf $1/$f |
| 17 | fi |
| 18 | done |
| 19 | |
| 20 | # Copy over the android directory |
| 21 | cp -r $2/android $1/android |