prebuilt: Add a script to simplify A-only recovery system mount

* This can be helpful because of the fragmentation that will happen with the system mount in recovery after Q

Change-Id: I2d1e775efcf87e33319bc7790d1e54bca72116d3
diff --git a/prebuilt/common/bin/system-mount.sh b/prebuilt/common/bin/system-mount.sh
new file mode 100644
index 0000000..7581482
--- /dev/null
+++ b/prebuilt/common/bin/system-mount.sh
@@ -0,0 +1,33 @@
+#!/sbin/sh
+#
+# System mount script
+#
+
+system=$(mount | grep system | sed 's|.*on ||' | sed 's| type.*||')
+system_device=${2}
+
+if [ -d /mnt/system ]; then
+  sys_mount="/mnt/system"
+elif [ -d /system_root ]; then
+  sys_mount="/system_root"
+else
+  sys_mount="/system"
+fi;
+
+case ${1} in
+  check)
+    if [ ! -z "$system" ]; then
+      umount $system
+    fi
+  ;;
+  backup)
+    mount $system_device $sys_mount
+    ./tmp/install/bin/backuptool.sh "backup" $sys_mount/system
+    umount $sys_mount
+  ;;
+  restore)
+    mount $system_device $sys_mount -t ext4
+    ./tmp/install/bin/backuptool.sh "restore" $sys_mount/system
+    umount $sys_mount
+  ;;
+esac