Skip to content

Commit

Permalink
reset source order fix
Browse files Browse the repository at this point in the history
  • Loading branch information
woensug-choi committed Jun 17, 2024
1 parent d2f5df0 commit a566115
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions gz_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,19 @@ printf '\n\n\033[34m'; printf '=%.0s' {1..75}; printf '\033[0m\n'
echo -e "\033[34m### [3/6] Downloading Gazebo Harmonic Source Code\033[0m"
printf '\033[34m%.0s=\033[0m' {1..75} && echo
# ------------------------------------------------------------------------------
# Get Gazebo Harmonic Source Code
echo -e "\033[36m> Getting Gazebo Harmonic Code...\033[0m"
echo -e "As long as the spinner at of the terminal is running, it is downloading the source code. It does take long."
echo -e "If you see 'E' in the progress, it means the download failed (slow connection does this), it will try again."
echo -e "If it takes too long, please check your network connection and try again. To cancel, Ctrl+C."
echo -e "\033[33mSTART---------------------------------- DOWNLOADING... ---------------------------------------------END\033[0m"

# Reset git directories (git clean -d -f .) if they exist inside src directory
if [ -d "src" ]; then
echo -e "\033[36m> Resetting git directories inside src...\033[0m"
find src -name ".git" -type d -execdir git reset --hard origin \;
fi

# Get Gazebo Harmonic Source Code
echo -e "\033[36m> Getting Gazebo Harmonic Code...\033[0m"
echo -e "As long as the spinner at of the terminal is running, it is downloading the source code. It does take long."
echo -e "If you see 'E' in the progress, it means the download failed (slow connection does this), it will try again."
echo -e "If it takes too long, please check your network connection and try again. To cancel, Ctrl+C."
echo -e "\033[33mSTART--------END\033[0m"

# Define maximum number of retries
max_retries=3
# Start loop
Expand All @@ -211,7 +211,7 @@ for ((i=1;i<=max_retries;i++)); do
break
else
echo -e "\033[31m\nGazebo Harmonic Source Code Import failed, retrying ($i/$max_retries)\033[0m"
echo -e "\033[33mSTART---------------------------------- DOWNLOADING... ---------------------------------------------END\033[0m"
echo -e "\033[33mSTART--------END\033[0m"
fi
# If we've reached the max number of retries, exit the script
if [ $i -eq $max_retries ]; then
Expand Down
12 changes: 6 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,19 +312,19 @@ printf '\n\n\033[34m'; printf '=%.0s' {1..75}; printf '\033[0m\n'
echo -e "\033[34m### [3/6] Downloading ROS2 Jazzy Source Code\033[0m"
printf '\033[34m%.0s=\033[0m' {1..75} && echo
# ------------------------------------------------------------------------------
# Reset git directories (git clean -d -f .) if they exist inside src directory
if [ -d "src" ]; then
echo -e "\033[36m> Resetting git directories inside src...\033[0m"
find src -name ".git" -type d -execdir git reset --hard origin \;
fi

# Get ROS2 Jazzy Source Code (Jazzy-Release Version of $JAZZY_RELEASE_TAG)
echo -e "\033[36m> Getting ROS2 Jazzy Source Code (Jazzy-Release tag of $JAZZY_RELEASE_TAG)...\033[0m"
echo -e "As long as the spinner at of the terminal is running, it is downloading the source code. It does take long."
echo -e "If you see 'E' in the progress, it means the download failed (slow connection does this), it will try again."
echo -e "If it takes too long, please check your network connection and try again. To cancel, Ctrl+C."
echo -e "\033[33mSTART---------------------------------- DOWNLOADING... ---------------------------------------------END\033[0m"

# Reset git directories (git clean -d -f .) if they exist inside src directory
if [ -d "src" ]; then
echo -e "\033[36m> Resetting git directories inside src...\033[0m"
find src -name ".git" -type d -execdir git reset --hard origin \;
fi

# Define maximum number of retries
max_retries=3
# Start loop
Expand Down

0 comments on commit a566115

Please sign in to comment.