Skip to content

Commit

Permalink
update-template-{alpine,fedora}.sh: fix default value of overriding
Browse files Browse the repository at this point in the history
`overriding` may be empty when called from `update-template.sh`

Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
  • Loading branch information
norio-nomura committed Oct 31, 2024
1 parent 6a0479b commit c620767
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hack/update-template-alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function alpine_cache_key_for_image_kernel() {
}
function alpine_image_entry_for_image_kernel() {
local location=$1 kernel_is_not_supported=$2 overriding=${3:-"{}"} url_spec image_entry=''
local location=$1 kernel_is_not_supported=$2 overriding=${3:-'{"path_version":"latest-stable"}'} url_spec image_entry=''
[[ ${kernel_is_not_supported} == "null" ]] || echo "Updating kernel information is not supported on Alpine Linux" >&2
url_spec=$(alpine_url_spec_from_location "${location}" | jq -r ". + ${overriding}")
image_entry=$(alpine_latest_image_entry_for_url_spec "${url_spec}")
Expand Down
4 changes: 2 additions & 2 deletions hack/update-template-fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function fedora_cache_key_for_image_kernel() {
}
function fedora_image_entry_for_image_kernel() {
local location=$1 kernel_is_not_supported=$2 overriding=${3:-"{}"} url_spec image_entry=''
local location=$1 kernel_is_not_supported=$2 overriding=${3:-'{"path_version":"releases/\\d+"}'} url_spec image_entry=''
[[ ${kernel_is_not_supported} == "null" ]] || echo "Updating kernel information is not supported on Fedora Linux" >&2
url_spec=$(fedora_url_spec_from_location "${location}" | jq -r ". + ${overriding}")
image_entry=$(fedora_latest_image_entry_for_url_spec "${url_spec}")
Expand Down Expand Up @@ -186,7 +186,7 @@ else
fi
declare -a templates=()
declare overriding='{"path_version":"releases/\\d+"}'
declare overriding='{}'
while [[ $# -gt 0 ]]; do
case "$1" in
-h | --help)
Expand Down

0 comments on commit c620767

Please sign in to comment.