/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
android/script/for_all_devices.sh
22 строки
572 B
Dmitry Yunitsky
Typo in bash script.
23 сен 2015, 02:22
23 сен 2015, 02:22
d574bed
Код
Авторство
О чём код?
#!/bin/bash START=$(date +%s) # get all ids, but not the first line devices=$(adb devices | cut -f1 | grep -v List) if [ -z "$devices" ]; then echo "Could not fine any connected devices, try: adb kill-server; adb start-server" fi count=$(echo "$devices" | wc -l | tr -d ' ') echo "Found $count devices and $# action to run" # run each script with each device's id for scr_name in $@; do for id in $devices; do echo "Running $scr_name at $id" sh $scr_name $id done done END=$(date +%s) DIFF=$(( $END - $START )) echo "Done in $DIFF seconds"