From 07357442a94d2cf59db1abc26956b014a2d5124d Mon Sep 17 00:00:00 2001 From: collin <16715212+collinc97@users.noreply.github.com> Date: Fri, 23 Sep 2022 10:42:07 -0700 Subject: [PATCH] Steal pranav's clever bash script to pull universal parameters --- .circleci/leo-new.sh | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.circleci/leo-new.sh b/.circleci/leo-new.sh index 721dd2654e..795db42862 100755 --- a/.circleci/leo-new.sh +++ b/.circleci/leo-new.sh @@ -1,15 +1,25 @@ -# Create a new Leo program named `foo`. -$LEO new foo -ls -la -cd foo && ls -la -# Try to run `leo build`. -( - $LEO build || exit -) +echo " +Step 4: Downloading parameters. This may take a few minutes..." +# Create a new dummy Leo project. +$LEO new dummy > /dev/null 2>&1 && cd dummy + +# Attempt to compile the dummy program until it passes. +# This is necessary to ensure that the universal parameters are downloaded. +declare -i DONE + +DONE=1 + +while [ $DONE -ne 0 ] +do + $LEO build > /dev/null 2>&1 + DONE=$? + sleep 0.5 +done # Try to run `leo run`. -( - $LEO run || exit -) +$LEO run || exit + +# Remove the dummy program. +cd .. && rm -rf dummy \ No newline at end of file