Skip to content

Commit

Permalink
ardupilot: add more comments to build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
spernsteiner committed Sep 11, 2024
1 parent 72f9e65 commit aee35d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/autopilot/ardupilot_build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -euo pipefail

# Script for installing ArduPilot build dependencies.
# Build the ArduPilot SITL binary for aarch64.

cd "$(dirname "$0")/ardupilot"

Expand Down
3 changes: 2 additions & 1 deletion components/autopilot/ardupilot_init_submodules.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -euo pipefail

# Initialize additional submodules that are needed for the ArduPilot build.
# Initialize ArduPilot submodules that are needed for the SITL build.

cd "$(dirname "$0")/ardupilot"

Expand All @@ -17,6 +17,7 @@ modules=(
DroneCAN/DSDL
DroneCAN/libcanard
)

for x in "${modules[@]}"; do
edo git submodule update --init "modules/$x"
done
10 changes: 9 additions & 1 deletion components/autopilot/ardupilot_install_deps.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash
set -euo pipefail

# Script for installing ArduPilot build dependencies.
# Script for installing ArduPilot build dependencies. Run with `BUILD_ONLY=1`
# to install only the dependencies required to build ArduPilot SITL binaries;
# the default is to install these and also dependencies of the mavproxy ground
# station software.

cd "$(dirname "$0")/ardupilot"

Expand All @@ -10,10 +13,15 @@ edo() {
"$@"
}

# Echo the first argument. This is useful for expanding a (possible) glob
# pattern to a single concrete filename.
first() {
echo "$1"
}

# Install a package with `apt-get`, but only if a certain file is missing from
# the system. Running `apt-get install` on an already-installed package is a
# no-op, but we'd like to avoid asking for `sudo` privileges unnecessarily.
install_if_missing() {
local package="$1"
local file="$2"
Expand Down

0 comments on commit aee35d9

Please sign in to comment.