Skip to content

Commit

Permalink
theory#79 apply requested changes on old bash compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
briansalehi committed Oct 6, 2024
1 parent 4e94d6b commit 6fa832d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions bin/pgenv
Original file line number Diff line number Diff line change
Expand Up @@ -1360,14 +1360,15 @@ case $1 in
$PGENV_CURL -fLO ${PGENV_DOWNLOAD_ROOT}/v$v/${PG_TARBALL}
fi

if [[ ${v%.*} -ge 17 ]]; then
# Starting from 17.x docs target might fail
# due to a missing dependency (docbooks-xsl).
# Download the docs tarball separately and
# install it after build.
if [[ $v =~ ^(1[789]|[2-9][0-9])\. ]]; then
PG_DOCS_TARBALL="postgresql-$v-docs.tar.gz"
DOCS_TAR_OPTS="zxf"

pgenv_debug "Downloading docs tarball"

# starting from 17.x docs target might fail
# due to a missing dependency (docbooks-xsl).
if [ ! -f $PG_DOCS_TARBALL ]; then
$PGENV_CURL -fLO ${PGENV_DOWNLOAD_ROOT}/v$v/${PG_DOCS_TARBALL}
fi
Expand Down Expand Up @@ -1425,10 +1426,10 @@ EOF
# dependency for docs since 17.x and above, extracted
# docs will be placed into the source directory,
# as if they were built.
if [[ ${v%.*} -ge 17 ]]; then
if [[ $v =~ ^(1[789]|[2-9][0-9])\. ]]; then
pgenv_debug "Unpacking docs tarball"

$PGENV_TAR $DOCS_TAR_OPTS $PG_DOCS_TARBALL
$PGENV_TAR zxf $PG_DOCS_TARBALL
fi
fi

Expand Down

0 comments on commit 6fa832d

Please sign in to comment.