mod_test_image_for_staging.sh: inline sudo_append

No other script uses this func anymore, so pull it out of common.sh.

BUG=None
TEST=None

Change-Id: Ib2901c30b90554f993a616cf2bd8769e4ad66cea
Reviewed-on: https://chromium-review.googlesource.com/1762461
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
diff --git a/provingground/mod_test_image_for_staging.sh b/provingground/mod_test_image_for_staging.sh
index 8c18825..a7b1605 100755
--- a/provingground/mod_test_image_for_staging.sh
+++ b/provingground/mod_test_image_for_staging.sh
@@ -43,6 +43,13 @@
   "${SCRIPTS_DIR}/mount_gpt_image.sh" -u -r "$ROOT_FS_DIR"
 }
 
+# Writes stdin to the given file name as root using sudo in append mode.
+#
+# $1 - The output file name.
+sudo_append() {
+  sudo tee -a "$1" >/dev/null
+}
+
 if [ ! -d "$VBOOT_DIR" ]; then
   die "The required path: $VBOOT_DIR does not exist. This directory needs"\
       "to be sync'd into your chroot.\n $ cros_workon start vboot_reference"