From bcac01114c60feeee4e7dcd86cd7f480d8424939 Mon Sep 17 00:00:00 2001 From: Eric Rasche Date: Tue, 13 Sep 2016 20:11:58 +0000 Subject: [PATCH] Remove old, gzip auto --- build.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/build.sh b/build.sh index 13691ff..a72350c 100755 --- a/build.sh +++ b/build.sh @@ -14,6 +14,8 @@ cd "Chado-${BRANCH}/chado/" || exit; patch -p1 < /opt/fix_relationshiptype_lc.diff mv /opt/load.conf.tt2 /build/Chado-${BRANCH}/chado/load/tt2/load.conf.tt2 +# Remove old versions in case bad things happen +rm /host/* VERSION=$(cat Makefile.PL | grep 'my $VERSION' | sed 's/.* = //g;s/;//';) @@ -22,7 +24,7 @@ make make install make load_schema make prepdb -pg_dump -h localhost -p 5432 -U postgres --no-owner --no-acl postgres > "/host/chado-${VERSION}-no-onto.sql" +pg_dump -h localhost -p 5432 -U postgres --no-owner --no-acl postgres | gzip > "/host/chado-${VERSION}-no-onto.sql.gz" echo "1" | make ontologies psql -h localhost -p 5432 -U postgres -c "UPDATE cvterm SET cv_id = 7 WHERE cv_id IN (SELECT cv_id FROM cv WHERE name='ro')" @@ -45,16 +47,9 @@ echo "select * from fill_cvtermpath('cellular_component');" | psql -h localhost # Update links to external dbs psql -h localhost -p 5432 -U postgres < /opt/update_urls.sql -pg_dump -h localhost -p 5432 -U postgres --no-owner --no-acl postgres > "/host/chado-${VERSION}.sql" +pg_dump -h localhost -p 5432 -U postgres --no-owner --no-acl postgres | gzip > "/host/chado-${VERSION}.sql.gz" psql -h localhost -p 5432 -U postgres -c 'ALTER SCHEMA public RENAME TO chado' -pg_dump -h localhost -p 5432 -U postgres --no-owner --no-acl postgres > "/host/chado-${VERSION}-tripal.sql" - -gzip < "/host/chado-${VERSION}-no-onto.sql" > "/host/chado-${VERSION}-no-onto.sql.gz" -gzip < "/host/chado-${VERSION}.sql" > "/host/chado-${VERSION}.sql.gz" -gzip < "/host/chado-${VERSION}-tripal.sql" > "/host/chado-${VERSION}-tripal.sql.gz" - -# Remove non-gzipped versions, zero value. -rm /host/chado-${VERSION}*.sql +pg_dump -h localhost -p 5432 -U postgres --no-owner --no-acl postgres | gzip > "/host/chado-${VERSION}-tripal.sql.gz" echo "The schema build has completed. The container will now intentionally crash" exit 42;