Skip to content

Commit

Permalink
chore: add check if path is a dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristina-Pianykh committed Sep 2, 2024
1 parent 079db2f commit 14db129
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions python/generate_mixed_traces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
BASE_DIR=$(realpath "$(dirname "$0")")
echo "BASE_DIR: $BASE_DIR"

TOPOLOGY_DIR="/Users/krispian/Uni/bachelorarbeit/topologies_delayed_inflation"
TOPOLOGY_DIR="/Users/krispian/Uni/bachelorarbeit/topologies_delayed_systematic_inflation"

for i in $(ls $TOPOLOGY_DIR)
do
poetry run python ${BASE_DIR}/mix_traces.py \
--topology_dir "${TOPOLOGY_DIR}/${i}"
if [ $? -ne 0 ]; then
echo "Error mixing traces for ${TOPOLOGY_DIR}/${i}"
exit 1
if [[ -d ${TOPOLOGY_DIR}/${i} ]]; then
poetry run python ${BASE_DIR}/mix_traces.py \
--topology_dir "${TOPOLOGY_DIR}/${i}"
if [ $? -ne 0 ]; then
echo "Error mixing traces for ${TOPOLOGY_DIR}/${i}"
exit 1
fi
else
echo "$i is not a directory"
fi
done

0 comments on commit 14db129

Please sign in to comment.