-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·48 lines (32 loc) · 958 Bytes
/
setup.sh
File metadata and controls
executable file
·48 lines (32 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#/bin/bash
# Stop script on errors:
set -e
# Check environment:
if ! command -v pip >/dev/null 2>&1; then
echo "[ERROR] Missing 'pip' on your system. For Ubuntu/Debian run: sudo apt install python3-pip" >&2
exit 1
fi
# Change to project directory:
pushd "$(dirname "$(realpath "$0")")" > /dev/null || exit 1
# Base:
mkdir -p routes
chmod u+x *.sh *.py
# Install dependencies in local project directory:
python -m venv "local"
source "local/bin/activate"
# Indirect deps:
# shapely <- geopandas
# pandas <- geopandas
pip install geopandas gpxpy lxml osmnx geopy pygeohash adbutils
# Android Debug Bridge:
if [ -d ./local/opt/platform-tools ]
then
echo "[INFO] ADB already installed"
else
zipname=platform-tools-latest-linux.zip
wget "https://dl.google.com/android/repository/$zipname"
mkdir -p "local/opt"
unzip "$zipname" -d "local/opt" && rm "$zipname"
"./local/opt/platform-tools/adb" version
fi
popd > /dev/null || exit 1