Skip to content

Commit

Permalink
Fix adb_pull_app() when app isn’t available
Browse files Browse the repository at this point in the history
  • Loading branch information
riyad committed Dec 26, 2015
1 parent 3fa2048 commit 72afd97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion android-backup
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand Down

0 comments on commit 72afd97

Please sign in to comment.