#!/bin/bash cd $(dirname $0) cd .. tempDir=$(mktemp -d) sourceDir="./Website" find . -name "*" -and -not -name "." -and -not -path "$sourceDir/*" -and -not -path $sourceDir -exec rm -rf {} + rsync -a --delete ./src/ $tempDir rsync -a --delete $tempDir/ . rm -rf $tempDir