mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2025-12-23 22:47:55 -05:00
42 lines
910 B
Bash
Executable File
42 lines
910 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
base="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
|
|
|
|
mkdir -p "$base/build/bin"
|
|
rm -f "$base/build/bin"/*
|
|
|
|
pushd "$base/build" &>/dev/null || exit 1
|
|
|
|
popd &>/dev/null || exit 1
|
|
|
|
build=${build:-$(ls $base/scripts/deps)}
|
|
|
|
for script in "$base/scripts/mac-experimental/deps/"*
|
|
do
|
|
[ -e "$script" ] || continue # skip if no file exists
|
|
[ -x "$script" ] || continue # skip if not executable
|
|
|
|
filename=$(basename "$script")
|
|
|
|
if [[ "$filename" == _* ]]
|
|
then
|
|
echo "Skipping: $filename"
|
|
continue
|
|
fi
|
|
|
|
# skip if not in build list
|
|
if ! grep -qw "$filename" <<< "$build";
|
|
then
|
|
echo "Skipping: $filename"
|
|
continue
|
|
fi
|
|
|
|
echo "Preparing: $filename"
|
|
|
|
# make sure each script is run in the base directory
|
|
pushd "$base" &>/dev/null || exit 1
|
|
bash "$script"
|
|
popd &>/dev/null || exit 1
|
|
done
|