2026-10-25 21:20:38

This commit is contained in:
support committed 2026-10-25 22:20:39 +01:00
1 parent 744968e6d3
commit f7e10a287c
18 files changed
+63 -7

No files matched your search

+18 -1
View File
@@ -169,6 +169,15 @@ RECIPE_HEADER
printf 'Saved installation recipe: %s\n' "$recipe"
}
record_source_download() {
local product="$1"
local source_url="$2"
local git_tag="${3:-}"
[[ -n "${SOURCE_MANIFEST:-}" ]] || return 0
printf '%s\t%s\t%s\n' "$product" "$source_url" "$git_tag" >> "$SOURCE_MANIFEST"
}
require_postgresql_installation() {
local prefix="$1"
local pg_config="$prefix/bin/pg_config"
@@ -183,14 +192,22 @@ download_source() {
local archive_name="$4"
local source_dir="$5"
local archive="$staging_dir/$archive_name"
local source_url
source_url="$(github_source_url "$repository" "$tag")"
curl -fL --retry 3 --retry-delay 2 \
-o "$archive" \
"https://github.com/$repository/archive/refs/tags/$tag.tar.gz"
"$source_url"
tar -xzf "$archive" -C "$staging_dir"
[[ -d "$source_dir" ]] || die "source directory was not created: $source_dir"
}
github_source_url() {
local repository="$1"
local tag="$2"
printf 'https://github.com/%s/archive/refs/tags/%s.tar.gz\n' "$repository" "$tag"
}
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
printf 'Shared helper functions used by PostgreSQL component installers.\n'