Page MenuHomeSealhub

set_geo_full.sh
No OneTemporary

set_geo_full.sh

#!/bin/bash
last_stat=1;
output="";
function set_coords_checked {
output=$(bash /conf/set_geo.sh $1 $2)
last_stat=$?
if test $last_stat -eq 2; then
echo $output
exit 1
fi
}
count=0;
while true; do
set_coords_checked $1 $2
if [ $last_stat -eq 0 -o $count -ge 3 ]; then
break;
fi
adb shell am start-activity com.google.android.apps.maps &> /dev/null
count_inner=0;
last_stat=1;
while [ $last_stat -ne 0 -a $count_inner -le 40 ]; do
set_coords_checked $1 $2;
count_inner=$(( $count_inner + 1 ));
done
adb shell am stop-app com.google.android.apps.maps
sleep 1
count=$(( $count + 1 ));
done
if [ $last_stat -eq 0 ]; then
echo $output
else
echo Failed to change the coordinates, try again later
fi
exit $last_stat

File Metadata

Mime Type
text/x-shellscript
Expires
Sat, Nov 8, 01:28 (2 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1033460
Default Alt Text
set_geo_full.sh (741 B)

Event Timeline