forgejo-custom/download-templates.sh
2025-02-28 01:16:00 -05:00

17 lines
427 B
Bash
Executable file

#!/usr/bin/env zsh
# Download the given version of all the templates which exist
VERSION="v10.0.1"
TEMPLATES_DIR=templates-$VERSION
if [ -d $TEMPLATES_DIR ]; then
rm -rf $TEMPLATES_DIR
fi
for i in custom/templates/**/*.tmpl; do
newfile=$TEMPLATES_DIR${i#custom/templates}
echo Downloading $newfile
mkdir -p $(dirname $newfile)
curl -o $newfile "https://codeberg.org/forgejo/forgejo/raw/tag/$VERSION/${i#custom/}"
done