Website, once hosted on hoschi-it.de
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.
 
 

44 lines
1.2 KiB

#!/bin/bash
# builds hoschi-it.de the way I want to deploy it later
#
# Requirements:
# have https://github.com/snonux/gemtexter cloned to a sibling directory of
# the current directory
# Features:
# create a folder that
# 1. contains current state of the website
# 2. also contain legacy versions of the website (where the paths do not
# interfere with each other)
TargetFolder="./distribution";
SourcePrefix="html";
WorkingDirectory=$(pwd)
# use configuration file from this repository
export CONFIG_FILE_PATH=$(echo $WorkingDirectory)/gemtexter.conf
# enable printing the bash commands that are being executed
set -o xtrace;
# `set -o xtrace`
cd ../gemtexter && \
./gemtexter --feed && \
./gemtexter --generate && \
cd $WorkingDirectory
rm $TargetFolder -Rf
# Copy legacy website(s)
rsync --recursive --verbose ${SourcePrefix}_*/* $TargetFolder
# Copy current website; overwriting the legacy ones where needed.
rsync --recursive --verbose ${SourcePrefix}/* $TargetFolder
# Copy construction info page
rsync --recursive --verbose ${SourcePrefix}_under-construction/* $TargetFolder
# # commit the build
# git add $TargetFolder
# git commit -m "Automated build" \
# --author="build script <script@hoschi-it.de>" \
# -- $TargetFolder