ci: Handle case where prebuilt was cached but brew install binutils
We create a simlink in prebuilt for certain tools like objcopy
that are brew installed from binutils. It is likely that we
will cache the simlink, but still need to brew install binutils
this will fail because we will try to create the symlink again.
This change always recreates the symlink if the brew install was
required.
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
diff --git a/cibuild.sh b/cibuild.sh
index 928ea8f..62ab8f1 100755
--- a/cibuild.sh
+++ b/cibuild.sh
@@ -322,6 +322,9 @@
case $os in
Darwin)
brew install binutils
+ # It is possible we cached prebuilt but did brew install so recreate
+ # simlink if it exists
+ rm -f $prebuilt/bintools/bin/objcopy
ln -s /usr/local/opt/binutils/bin/objcopy $prebuilt/bintools/bin/objcopy
;;
esac