libinput/tools/publish-doc
Peter Hutterer 44b9dca9d5 tools: update the publish-doc tool to use ninja
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-06-13 12:28:37 +10:00

22 lines
459 B
Bash
Executable file

#!/bin/bash
set -e
[ -e doc ] || (echo "Run this from the project root" && exit 1)
if ! [ -f build/build.ninja ]; then
echo "Setting up meson in directory 'build'"
meson build
fi
ninja -C build
[ -e build/html ] || (echo "HTML documentation failed to build" && exit 1)
path=latest
if [ -n "$1" ]; then
echo "Pushing to directory '$1'"
path="$1"
fi
rsync --delete -avz build/html/ freedesktop.org:/srv/wayland.freedesktop.org/www/libinput/doc/$path