#!/bin/bash USR=dotyaoverlord HOST=dotya.ml DIR=public/ HUGO_VERSION=$1 ~/bin/gethugo $HUGO_VERSION git submodule init git submodule update ~/bin/hugo version ~/bin/hugo --gc=true --minify if [ $USER = $USR ]; then rsync -av --delete public/ ~/${DIR} else rsync -avz --delete public/ ${USR}@${HOST}:~/${DIR} fi exit 0