You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
656 B

#!/bin/sh -e
echo "Username on remote host: " | tr -d '\n'
read -r username
if [ -d "./gemini/public" ]; then
rm -rf ./gemini/public
fi
if [ -d "./www/public" ]; then
rm -rf ./www/public
fi
# ----- gemini ----- #
cd gemini && hugo -v
if [ -f "./public/posts.xml" ]; then
mv -v public/posts.xml public/feed.xml
fi
cd ..
# ------ www ------ #
cd www && hugo -v
# I don't want title in homepage, but Hugo generates it anyway
sed -e 's/<header .*header>//g' -i public/index.html && cd ..
rsync -rvP --delete-after gemini/public/ ${username}@folliehiyuki.com:/srv/gemini/
rsync -rvP --delete-after www/public/ ${username}@folliehiyuki.com:/srv/www/