jenkins-bot has submitted this change and it was merged.

Change subject: Add ability to specify device to pullfiles.bash
......................................................................


Add ability to specify device to pullfiles.bash

Change-Id: I9e25d7ff6a65c07b280a88ecdfb0a4bb823b3614
---
M scripts/pullfiles.bash
1 file changed, 19 insertions(+), 2 deletions(-)

Approvals:
  Niedzielski: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/pullfiles.bash b/scripts/pullfiles.bash
index bdd0f27..8865a26 100755
--- a/scripts/pullfiles.bash
+++ b/scripts/pullfiles.bash
@@ -1,3 +1,20 @@
-#!/usr/bin/env bash
+#! /usr/bin/env bash
+
 # Pulls all files from the device and extracts them under app/
-adb backup -noapk org.wikipedia && dd if=backup.ab bs=1 skip=24 | python -c 
"import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar 
-xvf -
+#
+# Allows specifying a device serial number or qualifier
+
+# Python-based decompression, to avoid binary dependencies
+read -r -d '' python_commands <<- 'EOF'
+       import zlib
+       import sys
+       sys.stdout.write(zlib.decompress(sys.stdin.read()))
+EOF
+
+adb "$@" backup -noapk org.wikipedia \
+    && \
+dd if=backup.ab bs=1 skip=24 \
+\
+| python -c "$python_commands" \
+\
+| tar -xvf -

-- 
To view, visit https://gerrit.wikimedia.org/r/277078
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e25d7ff6a65c07b280a88ecdfb0a4bb823b3614
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Maroloccio <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Maroloccio <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: Niedzielski <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to