mirror of
https://github.com/clearlinux/docs.git
synced 2026-11-21 13:32:56 +00:00
Handle more failure edge cases in update.sh
This commit is contained in:
@@ -12,6 +12,11 @@ IFS=$'\n'
|
||||
lines=( $(curl -fsSL 'https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" | grep -vE '^$|^#') )
|
||||
unset IFS
|
||||
|
||||
if [ "${#lines[@]}" -eq 0 ]; then
|
||||
echo >&2 "Failed to read manifest file for $repo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
repoDirs=()
|
||||
declare -A repoDirTags=()
|
||||
|
||||
|
||||
@@ -109,7 +109,9 @@ for repo in "${repos[@]}"; do
|
||||
cp -v "$helperDir/template.md" "$repo/README.md"
|
||||
|
||||
echo ' TAGS => generate-dockerfile-links-partial.sh'
|
||||
replace_field "$repo" 'TAGS' "$("$helperDir/generate-dockerfile-links-partial.sh" "$repo")"
|
||||
partial="$("$helperDir/generate-dockerfile-links-partial.sh" "$repo")"
|
||||
[ "$partial" ]
|
||||
replace_field "$repo" 'TAGS' "$partial"
|
||||
|
||||
echo ' CONTENT => '"$repo"'/content.md'
|
||||
replace_field "$repo" 'CONTENT' "$(cat "$repo/content.md")"
|
||||
|
||||
Reference in New Issue
Block a user