fix: shellcheck for validate repos
This commit is contained in:
parent
cb4a804870
commit
9a77fb5d08
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Source mangle vars
|
# Source mangle vars
|
||||||
source $(dirname "$0")/common
|
source "$(dirname "$0")/common"
|
||||||
# Source sync / migrate vars for repository information
|
# Source sync / migrate vars for repository information
|
||||||
source $(dirname "$0")/../sync/common
|
source "$(dirname "$0")/../sync/common"
|
||||||
|
|
||||||
# How many
|
# How many
|
||||||
ARG1=${1}
|
ARG1=${1}
|
||||||
@ -11,7 +11,7 @@ NUM=$(( ${ARG1:-${MIRROR_DISPLAY_COUNT}} + 2))
|
|||||||
|
|
||||||
print_result () {
|
print_result () {
|
||||||
if [[ "${result}" =~ "invalid repo or arch" ]]; then
|
if [[ "${result}" =~ "invalid repo or arch" ]]; then
|
||||||
printf "# repo = %s arch = %s\n" "${_repo}" "${arch}"
|
printf "# repo = %s arch = %s\n" "${repo}" "${arch}"
|
||||||
printf "# FAIL: invalid repo or arch\n\n"
|
printf "# FAIL: invalid repo or arch\n\n"
|
||||||
else
|
else
|
||||||
printf "%s\n# number of mirrors returned: %s\n\n" "$( echo "$result" | head -${NUM})" "$(( $(echo "$result" | wc -l) - 2 ))"
|
printf "%s\n# number of mirrors returned: %s\n\n" "$( echo "$result" | head -${NUM})" "$(( $(echo "$result" | wc -l) - 2 ))"
|
||||||
@ -39,7 +39,7 @@ for repo in "${ALL_REPOS[@]}"; do
|
|||||||
cleanup_repo "${repo}"
|
cleanup_repo "${repo}"
|
||||||
|
|
||||||
# Print a nice header
|
# Print a nice header
|
||||||
printf "================\n${repo}\n================\n"
|
printf "================\n%s\n================\n" "${repo}"
|
||||||
for arch in "${ARCHES[@]}" "source"; do
|
for arch in "${ARCHES[@]}" "source"; do
|
||||||
# Source is treated as its own architecture
|
# Source is treated as its own architecture
|
||||||
if [[ "${arch}" == "source" ]]; then
|
if [[ "${arch}" == "source" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user