parent
4b3e1e9857
commit
02ec7bbe43
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 113 KiB |
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Define a file to keep track of successfully executed scripts
|
||||||
|
SUCCESS_LOG="successful_runs.log"
|
||||||
|
|
||||||
|
for f in examples/example_*.py; do
|
||||||
|
# Check if the script has been logged as successful
|
||||||
|
if grep -Fxq "$f" "$SUCCESS_LOG"; then
|
||||||
|
echo "Skipping ${f} as it ran successfully in a previous run."
|
||||||
|
else
|
||||||
|
# Run the script if not previously successful
|
||||||
|
if /home/kye/miniconda3/envs/swarms/bin/python "$f" 2>>errors.txt; then
|
||||||
|
echo "(${f}) ran successfully without errors."
|
||||||
|
# Log the successful script execution
|
||||||
|
echo "$f" >> "$SUCCESS_LOG"
|
||||||
|
else
|
||||||
|
echo "Error encountered in ${f}. Check errors.txt for details."
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "##############################################################################"
|
||||||
|
done
|
Loading…
Reference in new issue