From 85da543f8a5eb64e26cb67e248e9dee22091ee09 Mon Sep 17 00:00:00 2001 From: Mike Ritter Date: Mon, 25 Feb 2019 07:54:49 -0600 Subject: [PATCH] Added logic to remove circular links (#306) --- postgres-appliance/Dockerfile.build | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/postgres-appliance/Dockerfile.build b/postgres-appliance/Dockerfile.build index 80b57b8bf..74086322d 100644 --- a/postgres-appliance/Dockerfile.build +++ b/postgres-appliance/Dockerfile.build @@ -282,8 +282,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && if [ -d /usr/share/postgresql/9.5/contrib/postgis-$POSTGIS_VERSION ]; then \ cd /usr/share/postgresql/9.5/contrib/postgis-$POSTGIS_VERSION \ && for f in *.sql *.pl; do \ - for v in 9.4 9.6 10; do \ - if [ -f /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f ] \ + if [ -L $f ]; then continue; fi \ + && for v in $PGOLDVERSIONS; do \ + if [ $v != 9.5 ] && [ -f /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f ] \ && [ ! -L /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f ] \ && diff /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f $f > /dev/null; then \ rm /usr/share/postgresql/$v/contrib/postgis-$POSTGIS_VERSION/$f \ @@ -331,8 +332,9 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && if [ -d /usr/share/postgresql/9.5/extension ]; then \ cd /usr/share/postgresql/9.5/extension \ && for f in *.sql *.control; do \ - for v in 9.3 9.4 9.6 10; do \ - if [ -f /usr/share/postgresql/$v/extension/$f ] \ + if [ -L $f ]; then continue; fi \ + && for v in $PGOLDVERSIONS; do \ + if [ $v != 9.5 ] && [ -f /usr/share/postgresql/$v/extension/$f ] \ && [ ! -L /usr/share/postgresql/$v/extension/$f ] \ && diff /usr/share/postgresql/$v/extension/$f $f > /dev/null; then \ rm /usr/share/postgresql/$v/extension/$f \