This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script adb+ | |
# Run any command adb provides on all your currently connected devices, | |
# Or prompt to select one device | |
showHelp() { | |
echo "Usage: adb+ [-a] <command>" | |
echo " -h: show help" | |
echo " -a: run command on all device" | |
echo " command: normal adb commands" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find file in current and parent dir recursively | |
function find_up { | |
path=$(pwd) | |
while [[ "$path" != "" && ! -e "$path/$1" ]]; do | |
path=${path%/*} | |
done | |
if [[ ! -e "$path/$1" ]] | |
then | |
echo "ERROR: $1 not found" 1>&2 | |
return 1 |