Skip to content

Commit

Permalink
Tools: Carbonix custom Build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokesh-Carbonix committed Nov 19, 2023
1 parent 3e14d4c commit f97ff57
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Tools/Carbonix_scripts/carbonix_waf_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

# Exit if any command fails
set -e

# Check unstaged changes
if [[ $(git status --porcelain) ]]; then
echo "Error: There are unstaged changes in the repository."
exit 1
fi

# Check outdated submodules
# git submodule update --remote --quiet
# outdated_submodules=$(git submodule status | grep -e '-[[:alnum:]]' | awk '{print $2}')
# if [[ -n $outdated_submodules ]]; then
# echo "The following submodules are not updated:"
# echo "$outdated_submodules"
# exit 1
# fi

echo "Running distclean..."
./waf distclean

main_boards=("CarbonixCubeOrange" "CubeOrange" "sitl")

for board in "${main_boards[@]}"; do
echo "Compiling Plane for $board..."
./Tools/scripts/build_bootloaders.py "$board"
./waf configure --board "$board"
./waf plane
done

periph_boards=("CarbonixF405" "Volanti-M1" "Volanti-M2" "Volanti-M3" "Volanti-M4" "Volanti-M5" "Volanti-LWing" "Volanti-RWing" "Volanti-LTail" "Volanti-RTail" "Ottano-M1" "Ottano-M2" "Ottano-M3" "Ottano-M4" "Ottano-M5" "Ottano-LWing" "Ottano-RWing" "Ottano-LTail" "Ottano-RTail")

for board in "${periph_boards[@]}"; do
echo "Compiling AP_Periph for $board..."
./Tools/scripts/build_bootloaders.py "$board"
./waf configure --board "$board"
./waf AP_Periph
done


echo "Script completed successfully."

0 comments on commit f97ff57

Please sign in to comment.