2026-10-25 21:20:38
This commit is contained in:
1 parent
744968e6d3
commit
f7e10a287c
18 files changed
+63
-7
No files matched your search
@@ -108,6 +108,7 @@ fi
|
||||
|
||||
readonly PREFIX_VERSION="$(basename -- "$PREFIX")"
|
||||
readonly SOURCES_DIR="$SCRIPT_DIR/sources/$PREFIX_VERSION"
|
||||
readonly SOURCE_MANIFEST="$SOURCES_DIR/.source-manifest.tsv"
|
||||
readonly STAGING_DIR="$SCRIPT_DIR/tmp"
|
||||
readonly PROCESS_LOG="$INVOCATION_DIR/postgresql-$POSTGRES_VERSION-process.log"
|
||||
readonly ENGINE_ARCHIVE="$INVOCATION_DIR/postgresql-$PREFIX_VERSION-engine.tar.gz"
|
||||
@@ -119,7 +120,7 @@ readonly ENGINE_ARCHIVE="$INVOCATION_DIR/postgresql-$PREFIX_VERSION-engine.tar.g
|
||||
rm -rf -- "$STAGING_DIR"
|
||||
mkdir -p "$STAGING_DIR"
|
||||
|
||||
export PREFIX POSTGRES_CONFIGURE_OPTIONS
|
||||
export PREFIX POSTGRES_CONFIGURE_OPTIONS SOURCE_MANIFEST
|
||||
|
||||
if [[ -e "$PREFIX" || -L "$PREFIX" ]]; then
|
||||
printf 'WARNING: PostgreSQL installation directory already exists: %s\n' "$PREFIX" >&2
|
||||
@@ -145,6 +146,7 @@ printf 'PostgreSQL configure options: %s\n' "${POSTGRES_CONFIGURE_OPTIONS:-<none
|
||||
printf 'Recreating source archive directory: %s\n' "$SOURCES_DIR"
|
||||
rm -rf -- "$SOURCES_DIR"
|
||||
mkdir -p "$SOURCES_DIR"
|
||||
: > "$SOURCE_MANIFEST"
|
||||
|
||||
"$SCRIPT_DIR/install_postgresql.sh" --version "$POSTGRES_VERSION"
|
||||
"$SCRIPT_DIR/install_pg_cron.sh" --version "$POSTGRES_VERSION"
|
||||
@@ -197,6 +199,24 @@ if [[ -n "$CONFIG_FILE" ]]; then
|
||||
grep -E '^[[:space:]]*shared_preload_libraries[[:space:]]*=' "$CONFIG_FILE"
|
||||
fi
|
||||
|
||||
[[ -s "$SOURCE_MANIFEST" ]] || {
|
||||
printf 'ERROR: source download manifest is empty: %s\n' "$SOURCE_MANIFEST" >&2
|
||||
exit 1
|
||||
}
|
||||
printf '\nSource downloads:\n'
|
||||
while IFS=$'\t' read -r product source_url git_tag; do
|
||||
[[ -n "$product" && -n "$source_url" ]] || {
|
||||
printf 'ERROR: invalid source download record in %s\n' "$SOURCE_MANIFEST" >&2
|
||||
exit 1
|
||||
}
|
||||
printf ' %s\n Source URL: %s\n' "$product" "$source_url"
|
||||
if [[ -n "$git_tag" ]]; then
|
||||
printf ' Git tag: %s\n' "$git_tag"
|
||||
else
|
||||
printf ' Git tag: not applicable (PostgreSQL source archive)\n'
|
||||
fi
|
||||
done < "$SOURCE_MANIFEST"
|
||||
|
||||
extension_version() {
|
||||
local extension="$1"
|
||||
awk -F"'" '/^[[:space:]]*default_version[[:space:]]*=/{print $2; exit}' \
|
||||
|
||||
Reference in new issue
Block a user