summaryrefslogtreecommitdiff
path: root/post_update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'post_update.sh')
-rwxr-xr-xpost_update.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/post_update.sh b/post_update.sh
new file mode 100755
index 0000000..6f15e8f
--- /dev/null
+++ b/post_update.sh
@@ -0,0 +1,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