Skip to content

Commit 08bc59f

Browse files
committed
Changing upload script.
1 parent 50c9c5a commit 08bc59f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

upload.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,25 @@ fi
88

99
# Enable extended globbing.
1010
shopt -s extglob
11-
dir="main/testing/results"
1211

12+
dir = "main/testing/results"
13+
14+
# Check if directory exists
1315
if [ -d "$dir" ]; then
14-
file_count=$(ls -1 "$dir" | wc -l)
16+
# List and count every file in the directory
17+
file_count = $(ls -1 "$dir" | wc -l)
18+
19+
# Check if there are more than one file in the directory
1520
if [ "$file_count" -gt 1 ]; then
1621

1722
# Navigate to the subfolder containing the CSV files.
1823
cd "$dir"
1924
rm !(Generated_Maze-Example.csv)
25+
2026
echo "Deleting CSV files from ./main/testing/results"
2127
fi
28+
else
29+
echo "Directory does not exist."
2230
fi
2331

2432
# Upload to repository

0 commit comments

Comments
 (0)