Skip to content

Commit

Permalink
Debug output for add_sub_repos
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Apr 16, 2024
1 parent 9ff1219 commit 8c7bc9c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions make_help_scripts/add_sub_repos
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@ if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
add_sub_repositories () {
# checkout a base for defined starting point
cd "$base_dir" || { echo "Could not checkout base dir of control.ros.org. Exiting!"; exit "$ERRCODE"; }
for repo_name in "${!subrepo_url[@]}";
do echo "Create doc/$repo_name"
git clone "${subrepo_url[$repo_name]}" -b "$base_branch" doc/"$repo_name"
for repo_name in "${!subrepo_url[@]}"; do
if [ ! -d "doc/$repo_name" ]; then
echo "Create doc/$repo_name and checkout $base_branch branch"
git clone "${subrepo_url[$repo_name]}" -b "$base_branch" doc/"$repo_name"
else
echo "Update doc/$repo_name and checkout $base_branch branch"
cd doc/"$repo_name"
git fetch origin
git checkout "$base_branch"
git pull
cd "$base_dir"
fi
if [ ! -z ${subrepo_pr[$repo_name]} ]; then
echo "checkout PR: ${subrepo_pr[$repo_name]}"
cd doc/"$repo_name"
Expand Down

0 comments on commit 8c7bc9c

Please sign in to comment.