Skip to content

Commit

Permalink
Remove unnessary check (#553)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Goez <[email protected]>

Signed-off-by: Kevin Goez <[email protected]>
(cherry picked from commit b81290a)
  • Loading branch information
k7g03z authored and mergify[bot] committed Aug 16, 2022
1 parent aed3ad4 commit 7b4230a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion scripts/build_firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ fi
# Building specific firmware folder
echo "Building firmware for $RTOS platform $PLATFORM"

if [ $PLATFORM != "generic" ] && [ -d "$PREFIX/config/$RTOS/generic" ]; then
# Use the generic platform if directory found
if [ -d "$PREFIX/config/$RTOS/generic" ]; then
. $PREFIX/config/$RTOS/generic/build.sh
else
. $PREFIX/config/$RTOS/$PLATFORM/build.sh
Expand Down
8 changes: 4 additions & 4 deletions scripts/configure_firmware.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash
#! /bin/bash

set -e
set -o nounset
Expand All @@ -17,7 +17,7 @@ else
fi

# Check if configure script exists
if [ $PLATFORM != "generic" ] && [ -d "$PREFIX/config/$RTOS/generic" ]; then
if [ -d "$PREFIX/config/$RTOS/generic" ]; then
if [ ! -f $PREFIX/config/$RTOS/generic/configure.sh ]; then
echo "No configuration step needed for generic platform $PLATFORM"
exit 0
Expand All @@ -32,7 +32,7 @@ fi
# Parsing micro-ROS arguments
if [ $# -lt 1 ]; then
echo "micro-ROS application name must be provided: ros2 run micro_ros_setup configure_firmware.sh [app name] [options]"
# Check if RTOS has app listing funcions and source in case
# Check if RTOS has app listing funcions and source in case
if [ -f $PREFIX/config/$RTOS/list_apps.sh ]; then
. $PREFIX/config/$RTOS/list_apps.sh
print_available_apps
Expand Down Expand Up @@ -80,7 +80,7 @@ while [[ $# -gt 0 ]]; do
done

# Configure specific firmware folder if needed
if [ $PLATFORM != "generic" ] && [ -d "$PREFIX/config/$RTOS/generic" ]; then
if [ -d "$PREFIX/config/$RTOS/generic" ]; then
echo "Configuring firmware for $RTOS platform $PLATFORM"
exec $PREFIX/config/$RTOS/generic/configure.sh $@
else
Expand Down
2 changes: 1 addition & 1 deletion scripts/create_firmware_ws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fi
SKIP="microxrcedds_agent microxrcedds_client microcdr rosidl_typesupport_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_opensplice_cpp rosidl_typesupport_opensplice_c rmw_opensplice_cpp ros-${ROS_DISTRO}-cyclonedds ros-${ROS_DISTRO}-rti-connext-dds-cmake-module ros-${ROS_DISTRO}-rmw-connextdds-common ros-${ROS_DISTRO}-rmw-connextdds ros-${ROS_DISTRO}-rmw-cyclonedds-cpp google_benchmark_vendor performance_test_fixture ros-${ROS_DISTRO}-mimick-vendor rmw_cyclonedds_cpp rmw_connext_cpp rti-connext-dds-5.3.1 rmw_connextdds $EXTERNAL_SKIP"

# Check generic build
if [ $PLATFORM != "generic" ] && [ -d "$PREFIX/config/$RTOS/generic" ]; then
if [ -d "$PREFIX/config/$RTOS/generic" ]; then
TARGET_FOLDER=generic
else
TARGET_FOLDER=$PLATFORM
Expand Down
2 changes: 1 addition & 1 deletion scripts/flash_firmware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
fi

# Flash specific firmware folder if needed
if [ $PLATFORM != "generic" ] && [ -d "$PREFIX/config/$RTOS/generic" ]; then
if [ -d "$PREFIX/config/$RTOS/generic" ]; then
if [ -f $PREFIX/config/$RTOS/generic/flash.sh ]; then
echo "Flashing firmware for $RTOS platform $PLATFORM"
. $PREFIX/config/$RTOS/generic/flash.sh
Expand Down

0 comments on commit 7b4230a

Please sign in to comment.