-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_subtrees.sh
More file actions
executable file
·43 lines (36 loc) · 1.34 KB
/
update_subtrees.sh
File metadata and controls
executable file
·43 lines (36 loc) · 1.34 KB
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
#!/bin/bash
echo "🔄 Updating all subtree repos inside marinero_stack..."
# Define all repos to update (prefix → repo name)
declare -A repos=(
[goal_assignment]="goal_assignment"
[mapviz]="mapviz"
[marinero_control]="marinero_control"
[marinero_navigation]="marinero_navigation"
[marinero_pointclouds]="marinero_pointclouds"
[marinero_simulations]="marinero_simulations"
[robot_localization]="robot_localization"
)
# Loop through and update each repo
for prefix in "${!repos[@]}"; do
repo_name="${repos[$prefix]}"
repo_url="https://github.com/albic98/${repo_name}.git"
echo "---------------------------------------------"
echo "⏳ Pulling updates for: $repo_name → $prefix/"
echo "From: $repo_url"
echo "---------------------------------------------"
if [[ "$repo_name" == "mapviz" ]]; then
echo "⚠️ Special handling for mapviz: using branch 'ros2-devel'"
git subtree pull --prefix="$prefix" "$repo_url" ros2-devel --squash
else
git subtree pull --prefix="$prefix" "$repo_url" main --squash
fi
if [ $? -ne 0 ]; then
echo "❌ Failed to update $prefix"
else
echo "✅ Successfully updated $prefix"
fi
done
echo "---------------------------------------------"
echo "🚀 Pushing updates to marinero_stack..."
git push
echo "✅ All done!"