#!/bin/bash # This script pushes the html files to the main server. # Jeff Moe with Parrot and Phind-CodeLlama-34B-v2_q8.gguf # Functions declaration function check_file() { if [ ! -f "$1" ]; then echo "The $1 file does not exist." exit 1 else source "$1" fi } function push_files() { rsync \ -ultav \ "$1" \ "${URL}" rsync \ -ultav \ --delete-after \ "$1" \ "${URL}" } # Main script execution check_file ".env" if [ -z "${URL}" ]; then echo "Please add the URL to .env using the format: URL=\"\"" exit 1 fi push_files "./docs/_build/html/"