2020-03-11 21:32:57 +01:00
|
|
|
#!/bin/bash
|
2019-10-19 11:41:54 +02:00
|
|
|
|
2020-03-10 04:06:54 +01:00
|
|
|
USR=dotyaoverlord
|
2019-10-20 12:20:48 +02:00
|
|
|
HOST=dotya.ml
|
|
|
|
DIR=public/
|
2020-05-31 03:31:13 +02:00
|
|
|
export HUGO_VERSION=$1
|
2019-10-19 11:41:54 +02:00
|
|
|
|
2020-05-31 03:37:06 +02:00
|
|
|
if [ $(hugo version | grep -q ${HUGO_VERSION}; echo $?) -eq 1 ]; then
|
2020-05-31 03:31:13 +02:00
|
|
|
~/bin/gethugo $HUGO_VERSION
|
|
|
|
fi
|
2020-02-18 00:23:35 +01:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2020-03-11 21:40:44 +01:00
|
|
|
~/bin/hugo version
|
|
|
|
~/bin/hugo --gc=true --minify
|
2020-03-10 04:06:54 +01:00
|
|
|
|
2020-03-10 04:08:52 +01:00
|
|
|
if [ $USER = $USR ]; then
|
2020-03-10 04:06:54 +01:00
|
|
|
rsync -av --delete public/ ~/${DIR}
|
|
|
|
else
|
|
|
|
rsync -avz --delete public/ ${USR}@${HOST}:~/${DIR}
|
|
|
|
fi
|
2019-10-19 11:41:54 +02:00
|
|
|
|
|
|
|
exit 0
|