2024-08-24 02:16:17 +02:00
|
|
|
#!/bin/sh
|
2024-08-25 17:18:20 +02:00
|
|
|
. "$(dirname "$(realpath "$0")")/Lib/Globals.sh"
|
2024-08-24 02:16:17 +02:00
|
|
|
cd "${swd}/.."
|
|
|
|
|
|
|
|
mkdir -p ./build
|
|
|
|
cd ./build
|
|
|
|
cp -r \
|
2024-08-27 17:21:32 +02:00
|
|
|
../archetypes ../i18n \
|
2024-08-29 00:17:05 +02:00
|
|
|
../content ../assets \
|
2024-08-27 17:21:32 +02:00
|
|
|
../layouts ../themes \
|
2024-08-29 00:17:05 +02:00
|
|
|
../hugo.toml ../static \
|
2024-08-24 02:16:17 +02:00
|
|
|
./
|
2024-08-25 17:18:20 +02:00
|
|
|
|
2024-09-20 01:58:28 +02:00
|
|
|
if [ -z "${HUGO_ENV}" ]
|
|
|
|
then export HUGO_ENV=development
|
|
|
|
fi
|
|
|
|
|
2024-08-31 00:58:33 +02:00
|
|
|
if [ -n "${sitocttEnv}" ]
|
|
|
|
then
|
|
|
|
sed -i -e "s|#${sitocttEnv}:||g" ./hugo.toml
|
|
|
|
mv "./layouts/partials/assetsRoot.${sitocttEnv}.html" ./layouts/partials/assetsRoot.html || true
|
2024-08-29 00:17:05 +02:00
|
|
|
fi
|
|
|
|
|
2024-08-25 17:18:20 +02:00
|
|
|
sh "${swd}/Translate/Get.sh"
|
|
|
|
sh "${swd}/Translate/Apply.sh"
|
|
|
|
hugo $@
|
2024-08-24 02:16:17 +02:00
|
|
|
|
|
|
|
cd "${owd}"
|