Add a script to upload the documentation to a remote host

This commit is contained in:
2023-01-22 19:48:35 -05:00
parent c4cb8e638b
commit 762f32e1f0
2 changed files with 37 additions and 0 deletions

31
doc/upload.sh Executable file
View File

@@ -0,0 +1,31 @@
while getopts "u:h:p:" OPT; do
case $OPT in
u) UPLOAD_USER=$OPTARG;;
h) UPLOAD_HOST=$OPTARG;;
p) UPLOAD_PATH=$OPTARG;;
\?) exit 1;;
esac
done
if [ -z "$UPLOAD_USER" ]; then
echo "Missing user -u"
exit 1
fi
if [ -z "$UPLOAD_HOST" ]; then
echo "Missing host -h"
exit 1
fi
if [ -z "$UPLOAD_PATH" ]; then
echo "Missing path -p"
exit 1
fi
echo "Uploading documentation files to $UPLOAD_USER@$UPLOAD_HOST"
rsync -rptv \
--exclude-from=doc/upload_exclude.txt \
--delete --delete-excluded \
doc/ $UPLOAD_USER@$UPLOAD_HOST:$UPLOAD_PATH

6
doc/upload_exclude.txt Normal file
View File

@@ -0,0 +1,6 @@
Notes from Jeff Vogel.txt
SConscript
documentation.lyx
gpl-license.txt
upload_exclude.txt
upload.sh