Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Release Engineering
Public
toolkit
Commits
9a77fb5d
Unverified
Commit
9a77fb5d
authored
Jul 06, 2021
by
Neil Hanlon
Browse files
fix: shellcheck for validate repos
parent
cb4a8048
Changes
1
Hide whitespace changes
Inline
Side-by-side
mangle/validate_repos
View file @
9a77fb5d
#!/usr/bin/env bash
# Source mangle vars
source
$(
dirname
"
$0
"
)
/common
source
"
$(
dirname
"
$0
"
)
/common
"
# Source sync / migrate vars for repository information
source
$(
dirname
"
$0
"
)
/../sync/common
source
"
$(
dirname
"
$0
"
)
/../sync/common
"
# How many
ARG1
=
${
1
}
...
...
@@ -11,7 +11,7 @@ NUM=$(( ${ARG1:-${MIRROR_DISPLAY_COUNT}} + 2))
print_result
()
{
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
"
else
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
}
"
# Print a nice header
printf
"================
\n
${
repo
}
\n
================
\n
"
printf
"================
\n
%s
\n
================
\n
"
"
${
repo
}
"
for
arch
in
"
${
ARCHES
[@]
}
"
"source"
;
do
# Source is treated as its own architecture
if
[[
"
${
arch
}
"
==
"source"
]]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment