#!/bin/bash GIT_URL=https://git.lain.church/Jellyman-Group/Sern-Site.git OUTPUT_DIR=~/site WWW_DIR=/var/www/html/ WWW_DATA_USER=www-data # remove the old site rm -rf $OUTPUT_DIR # clone the new site git clone $GIT_URL $OUTPUT_DIR # Remove the README.md from the dir rm $OUTPUT_DIR/README.md # Copy data to webdir sudo cp -r $OUTPUT_DIR/* $WWW_DIR # Change ownership sudo chown -R $WWW_DATA_USER:$WWW_DATA_USER $WWW_DIR