-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·54 lines (38 loc) · 1.31 KB
/
install.sh
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
47
48
49
50
51
52
53
54
#!/bin/bash
# Install base packages
sudo apt install -y lsb-release curl gpg python3-wstool python3-catkin-tools
# ----- Install requirements.txt -----
# Check Python version
PYTHON_VERSION=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')
if [[ $(python3 -c "import sys; print(sys.version_info >= (3, 8))") == "False" ]]; then
echo "Python version 3.8 or higher is required."
exit 1
fi
# Check if pip3 is installed
if ! command -v pip3 &> /dev/null
then
echo "pip3 is not installed. Please install pip3 manually."
exit 1
fi
# Install Python packages required
pip3 install -r requirements.txt
# ----- Make python scripts executable -----
sudo chmod +x scripts/*.py
# ----- Clone repositories and install -----
declare -A repositories=(
["../rosboard"]="https://github.com/dheera/rosboard.git"
# Add more repositories as needed
)
# Iterate over each repository and check if it already exists
for repo_dir in "${!repositories[@]}"; do
repo_url=${repositories["$repo_dir"]}
if [ -d "$repo_dir" ]; then
echo "Repository directory $repo_dir already exists. Skipping cloning."
else
git clone "$repo_url" "$repo_dir"
fi
done
# ----- Build workspace -----
catkin build ezrospy rosboard
# ----- Skiplist packages -----
catkin config --skiplist rosboard