File tree 1 file changed +5
-20
lines changed 1 file changed +5
-20
lines changed Original file line number Diff line number Diff line change 42
42
exit 0
43
43
}
44
44
45
- make_api_call () {
46
- http_status=$( curl -s -o $http_output -w " %{http_code}" " $uri " )
47
- log.debug " HTTP status: $http_status "
48
- if [ " $http_status " -eq 200 ] ; then
49
- check_installed jq noexit
50
- if [ $? -eq 0 ] ; then
51
- cat $http_output | jq
52
- else
53
- cat $http_output
54
- fi
55
- elif [ " $http_status " -eq 429 ] ; then
56
- log.warn " \tAPI returned: 'too many requests', retry again after few seconds."
57
- else
58
- log.error " \tAPI call failed! HTTP status = $http_status "
59
- fi
60
- }
61
-
62
45
# ------------------------------- main -------------------------------
63
46
# First, make sure scripts root path is set, we need it to include files
64
47
if [ ! -z " $scripts_github " ] && [ -d $scripts_github ] ; then
@@ -113,8 +96,10 @@ while true; do
113
96
done
114
97
115
98
# Output all intermediate URLs
116
- log.stat " Redirect chain: "
117
- log.stat " ---> $url "
99
+ order=1
100
+ log.stat " Redirect chain order: "
101
+ log.stat " ${order} . ---> $url "
118
102
for redirect in " ${redirect_list[@]} " ; do
119
- log.stat " ---> $redirect "
103
+ (( order++ ))
104
+ log.stat " ${order} . ---> $redirect "
120
105
done
You can’t perform that action at this time.
0 commit comments