Welcome to mirror list, hosted at ThFree Co, Russian Federation.

for_all_devices.sh « script « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7b20403cc4f2d8379453ac66d5f94af2be06d2dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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"