-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheck-all-targets.sh
executable file
·55 lines (46 loc) · 1.28 KB
/
check-all-targets.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# SPDX-FileCopyrightText: 2022-2025 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
# Color
RED='\e[31m'
RESET='\e[0m'
show_help() {
echo "Usage: $0 <BASE_URL>"
echo
echo "This script checks for the presence of expected files and folders at the specified base URL."
echo
echo "Arguments:"
echo " BASE_URL The base URL where the artifact subdirectories are located."
echo
echo "Example:"
echo " $0 https://example.com/artifacts/path/"
}
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
show_help
exit 0
fi
if [ -z "$1" ]; then
echo -e "${RED}Error: No base URL provided.${RESET}"
show_help
exit 1
fi
BASE_URL="$1"
[[ "$BASE_URL" != */ ]] && BASE_URL="${BASE_URL}/"
subdirectories=(
"aarch64-linux.nvidia-jetson-orin-agx-debug/"
"aarch64-linux.nvidia-jetson-orin-nx-debug/"
"x86_64-linux.generic-x86_64-debug/"
"x86_64-linux.lenovo-x1-carbon-gen11-debug/"
"x86_64-linux.nvidia-jetson-orin-agx-debug-from-x86_64/"
"x86_64-linux.nvidia-jetson-orin-nx-debug-from-x86_64/"
)
main() {
for subdir in "${subdirectories[@]}"; do
local full_url="${BASE_URL}${subdir}"
echo
echo "* Target: ${subdir}"
sleep 2
bash ./check-one-target.sh ${full_url}
done
}
main "$@"