#!/bin/bash

cd $(cat ~/.flutter_path)/engine/src/out/

et build -c host_release -j $(nproc) &
et build -c ci/android_release -j $(nproc) &
et build -c ci/android_release_arm64 -j $(nproc) &
et build -c ci/android_release_x64 -j $(nproc) &

wait

rm android_release >/dev/null || true
rm android_release_arm64 >/dev/null || true
rm android_release_x64 >/dev/null || true

ln -sf ci/android_release android_release
ln -sf ci/android_release_arm64 android_release_arm64
ln -sf ci/android_release_x64 android_release_x64
