Skip to content

Commit 1c567e1

Browse files
committed
Make_basler: make progress optional and fix flag
1 parent d8264f2 commit 1c567e1

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run: git config --global --add safe.directory /__w/bitbots_main/bitbots_main
2222

2323
- name: Pull source code for libraries and install dependencies
24-
run: make install HTTPS=true ARGS="-ci"
24+
run: make install HTTPS=true ARGS="--ci"
2525

2626
- name: Set up colcon workspace
2727
run: |

scripts/deploy/tasks/install.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,22 @@ def _run(self, connections: Group) -> GroupResult:
2727
:return: The results of the task.
2828
"""
2929
internet_available_results = self._internet_available_on_target(connections)
30-
3130
if not internet_available_results.succeeded:
3231
return internet_available_results
3332

3433
# Some hosts have an internet connection, make updates and installs
3534
apt_upgrade_results = self._apt_upgrade(get_connections_from_succeeded(internet_available_results))
35+
if not apt_upgrade_results.succeeded:
36+
return apt_upgrade_results
37+
3638
basler_install_results = self._install_basler(get_connections_from_succeeded(apt_upgrade_results))
39+
if not basler_install_results.succeeded:
40+
return basler_install_results
41+
3742
rosdep_results = self._install_rosdeps(get_connections_from_succeeded(basler_install_results))
43+
if not rosdep_results.succeeded:
44+
return rosdep_results
45+
3846
pip_upgrade_results = self._pip_upgrade(get_connections_from_succeeded(rosdep_results))
3947
return pip_upgrade_results
4048

@@ -100,7 +108,7 @@ def _install_basler(self, connections: Group) -> GroupResult:
100108
"""
101109
print_debug("Installing basler drivers")
102110

103-
cmd = f"{self._remote_workspace}/src/scripts/make_basler.sh -ci"
111+
cmd = f"{self._remote_workspace}/src/scripts/make_basler.sh --ci"
104112
print_debug(f"Calling {cmd}")
105113
try:
106114
install_results = connections.sudo(cmd, hide=hide_output(), password=self._sudo_password)

scripts/make_basler.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ BLAZE_VERSION="1.5.0"
1414
# Check let the user confirm that they read the license agreement on the basler website and agree with it.
1515
echo "You need to confirm that you read the license agreements for pylon $PYLON_VERSION and the blaze supplementary package $BLAZE_VERSION on the basler download page (https://www.baslerweb.com/en/downloads/software-downloads/) and agree with it."
1616

17-
# Check -ci flag for automatic confirmation in the ci
18-
if [[ $1 == "-ci" ]]; then
17+
# Check --ci flag for automatic confirmation in the ci
18+
if [[ $1 == "--ci" ]]; then
1919
echo "Running in a CI environment, continuing..."
20+
SHOW_PROGRESS=""
2021
else
2122
# Ask the user if they want to continue and break if they don't
2223
read -p "Do you want to continue? [y/N] " -n 1 -r
@@ -25,6 +26,7 @@ else
2526
echo "Aborting..."
2627
exit 1
2728
fi
29+
SHOW_PROGRESS="--show-progress"
2830
fi
2931

3032
# Create function to check if we have an internet connection
@@ -49,7 +51,7 @@ else
4951
exit 1
5052
fi
5153
# Download the pylon driver to temp folder
52-
wget --no-verbose --show-progress $PYLON_DOWNLOAD_URL -O /tmp/pylon_${PYLON_VERSION}.tar.gz
54+
wget --no-verbose $SHOW_PROGRESS $PYLON_DOWNLOAD_URL -O /tmp/pylon_${PYLON_VERSION}.tar.gz
5355
# Extract the pylon driver
5456
tar -xzf /tmp/pylon_${PYLON_VERSION}.tar.gz -C /tmp
5557
# Install the pylon driver
@@ -69,7 +71,7 @@ else
6971
exit 1
7072
fi
7173
# Download the blaze supplementary package to temp folder
72-
wget --no-verbose --show-progress $BLAZE_DOWNLOAD_URL -O /tmp/pylon-blaze-supplementary-package_${BLAZE_VERSION}.deb
74+
wget --no-verbose $SHOW_PROGRESS $BLAZE_DOWNLOAD_URL -O /tmp/pylon-blaze-supplementary-package_${BLAZE_VERSION}.deb
7375
# Install the blaze supplementary package
7476
sudo apt install /tmp/pylon-blaze-supplementary-package_${BLAZE_VERSION}*.deb -y
7577
fi

0 commit comments

Comments
 (0)