Add target to make a flashable su addon
Run 'make addonsu' to make a flashable zip to install the addon and
'make addonsu-remove' for a flashable zip that removes it.
Change-Id: I5b2fe67f98f2474b923c074dc6025b47c6db2ae0
diff --git a/addonsu/51-addonsu.sh b/addonsu/51-addonsu.sh
new file mode 100644
index 0000000..895496d
--- /dev/null
+++ b/addonsu/51-addonsu.sh
@@ -0,0 +1,38 @@
+#!/sbin/sh
+
+. /tmp/backuptool.functions
+
+list_files() {
+cat <<EOF
+bin/su
+etc/init/superuser.rc
+xbin/su
+EOF
+}
+
+case "$1" in
+ backup)
+ list_files | while read FILE DUMMY; do
+ backup_file $S/"$FILE"
+ done
+ ;;
+ restore)
+ list_files | while read FILE REPLACEMENT; do
+ R=""
+ [ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
+ restore_file $S/"$FILE" "$R"
+ done
+ ;;
+ pre-backup)
+ # Stub
+ ;;
+ post-backup)
+ # Stub
+ ;;
+ pre-restore)
+ # Stub
+ ;;
+ post-restore)
+ # Stub
+ ;;
+esac