From 72afd975134982314188e2eb5a3c9e7335a5349c Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Sat, 26 Dec 2015 09:21:52 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20adb=5Fpull=5Fapp()=20when=20app=20isn?= =?UTF-8?q?=E2=80=99t=20available?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android-backup | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android-backup b/android-backup index 3beb616..444663d 100644 --- a/android-backup +++ b/android-backup @@ -18,7 +18,12 @@ adb_pull() { adb pull -p -a "$1" "$2" } adb_pull_app() { - adb_pull "$(adb_package_path "$1")" "$2" + if [[ -z "$(adb_package_path \"$1\")" ]]; then + echo "Can't find app '$1'." + return 1 + else + adb_pull "$(adb_package_path \"$1\")" "$2" + fi } adb_rm_dir() { adb shell "[[ -d \"$1\" ]] && rm -r \"$1\""