#!/bin/bash -
#===============================================================================
#
#         FILE: upload_tag_reports
#
#        USAGE: ./upload_tag_reports
#
#  DESCRIPTION: Uploads tag reports to the HPR server
#
#      OPTIONS: ---
# REQUIREMENTS: ---
#         BUGS: ---
#        NOTES: ---
#       AUTHOR: Dave Morriss (djm), Dave.Morriss@gmail.com
#      VERSION: 0.0.2
#      CREATED: 2021-01-03 15:13:22
#     REVISION: 2022-09-09 08:08:37
#
#===============================================================================

set -o nounset                              # Treat unset variables as an error

SCRIPT=${0##*/}
VERSION="0.0.2"

BASEDIR="$HOME/HPR/Database"
cd "$BASEDIR" || { echo "$SCRIPT: Failed to cd to $BASEDIR"; exit 1; }

PHPTAGS="$BASEDIR/tags.php"

#
# Sanity checks
#
[ -e "$PHPTAGS" ] || { echo "$SCRIPT: missing script $PHPTAGS"; exit 1; }

echo "$SCRIPT v$VERSION"

if scp -q "$PHPTAGS" hpr@hpr:www/; then
    echo "File $PHPTAGS uploaded successfully"
else
    echo "Problem uploading $PHPTAGS"
fi

exit

# vim: syntax=sh:ts=8:sw=4:ai:et:tw=78:fo=tcrqn21

