#!/bin/bash # # Create a list of all files that start with sdk sdk_files=($(find . -type d -name 'sdk*')) # Loop through each SDK folder for d in $sdk_files; do # CD into the SDK folder cd "$d" pwd # Make the shell scripts executable chmod +x *.sh # Run the dependencies and download scripts ./download.sh # Create the artifacts directory mkdir -p artifacts # If patch.sh exists, run it if [ -f patch.sh ]; then ./patch.sh fi echo "Building $d" ./build.sh echo "Done with $d" cd .. done