Skip to content

Commit

Permalink
gzip json discofeed files in temporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Stuart committed Jul 23, 2020
1 parent 9f0b848 commit fdbc76b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions utilities/githooks/post-receive
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ apachemdqdir=/var/www/html/mdq.uou/entities
# Set the location of the temporary mdq cache dir
mdqcachedir=/tmp/mdqcache

# Set the location of JSON discofeed files
jsontempdir=/tmp
discofeed=discofeed.json
discofeedall=discofeed-all.json

# This Git repo has had the latest stuff pushed to it, but it hasn't checked it out yet. So let's do it.
git --work-tree=$gitdir --git-dir=$gitdir/.git checkout -f

Expand All @@ -22,6 +27,12 @@ do
done
echo "Done."

# The JSON files should have been SCPed to /tmp and be sitting there happily.
echo -n "Gzipping 2 JSON discofeed files..."
gzip -9 < "${jsontempdir}/$discofeed" > "${jsontempdir}/${discofeed}.gz"
gzip -9 < "${jsontempdir}/$discofeedall" > "${jsontempdir}/${discofeedall}.gz"
echo "Done."

# The MDQ cache should have been SCPed to /tmp and be sitting there happily.
# First, we should untar it.
echo -n "Untarring mdq cache... "
Expand Down

0 comments on commit fdbc76b

Please sign in to comment.