2018-11-25 16:25:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-09-28 19:29:12 +00:00
|
|
|
BRANCH=main
|
2018-11-25 16:25:37 +00:00
|
|
|
NAMESPACE=gstreamer
|
2019-05-13 23:35:55 +00:00
|
|
|
JOB=documentation
|
2018-11-25 16:25:37 +00:00
|
|
|
|
2021-09-28 19:29:12 +00:00
|
|
|
WORK_DIR=$(mktemp -d -p "$DIR")
|
2018-11-25 16:25:37 +00:00
|
|
|
|
|
|
|
# deletes the temp directory
|
2021-09-28 19:29:12 +00:00
|
|
|
cleanup() {
|
2018-11-25 16:25:37 +00:00
|
|
|
rm -rf "$WORK_DIR"
|
|
|
|
echo "Deleted temp working directory $WORK_DIR"
|
|
|
|
}
|
|
|
|
|
|
|
|
# register the cleanup function to be called on the EXIT signal
|
|
|
|
trap cleanup EXIT
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "============================================================================================================================"
|
2021-09-28 19:29:12 +00:00
|
|
|
echo "Updating documentation from: https://gitlab.freedesktop.org/$NAMESPACE/gstreamer/-/jobs/artifacts/$BRANCH/download?job=$JOB"
|
2018-11-25 16:25:37 +00:00
|
|
|
|
|
|
|
date
|
|
|
|
|
|
|
|
cd $WORK_DIR
|
2021-09-28 19:29:12 +00:00
|
|
|
wget https://gitlab.freedesktop.org/$NAMESPACE/gstreamer/-/jobs/artifacts/$BRANCH/download?job=$JOB -O gstdocs.zip
|
2018-11-25 16:25:37 +00:00
|
|
|
|
|
|
|
unzip gstdocs.zip
|
|
|
|
|
|
|
|
DOC_BASE="/srv/gstreamer.freedesktop.org/public_html/documentation"
|
|
|
|
|
|
|
|
rsync -rvaz --links --delete documentation/ $DOC_BASE || /bin/true
|
|
|
|
chmod -R g+w $DOC_BASE; chgrp -R gstreamer $DOC_BASE
|
|
|
|
echo "Done updating documentation"
|
|
|
|
echo ""
|