Specify the EC build directory so that it does not require the model or version to be determined in the script. Signed-off-by: Tim Crawford <tcrawford@system76.com>
21 lines
354 B
Bash
Executable File
21 lines
354 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [ -z "$1" -o ! -e "$1" -o -z "$2" ]
|
|
then
|
|
echo "$0 <config> <output>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
EC_ARGS=()
|
|
while read line; do
|
|
if [[ "$line" != "#"* ]]; then
|
|
EC_ARGS+=("$line")
|
|
fi
|
|
done < "$1"
|
|
|
|
make -C ec clean
|
|
make -C ec VERSION="${VERSION}" "${EC_ARGS[@]}" BUILD=build -j "$(nproc)"
|
|
cp "ec/build/ec.rom" "$2"
|