This commit is contained in:
lda committed 2026-08-23 18:52:19 +07:00 Verified
1 parent e70a012b03
commit 067eff1ec8
3 files changed
+47 -7

No files matched your search

+16 -2
View File
@@ -27,6 +27,20 @@ if [[ -z "$custom_path" || "$custom_path" == *$'\n'* ]]; then
printf 'CustomPath must be exactly one non-empty path.\n' >&2
exit 1
fi
manifest_path="$("$SCRIPT_DIRECTORY/install-gitea-github-theme.sh" --print-manifest-path \
"$custom_path/public/assets/css" "$custom_path/templates")"
# Move manifests written by earlier script versions out of CustomPath before Gitea dump scans it.
for legacy_manifest in \
"$custom_path/.gitea-github-theme-files" \
"$custom_path/templates/.gitea-github-theme-files"; do
if [[ -f "$legacy_manifest" && ! -e "$manifest_path" ]]; then
mkdir -p "$(dirname "$manifest_path")"
mv -- "$legacy_manifest" "$manifest_path"
printf 'Moved theme manifest to %s.\n' "$manifest_path"
break
fi
done
if [[ ! "$gitea_version" =~ ^v?([0-9]+\.[0-9]+) ]]; then
printf 'Unable to determine major.minor from Gitea version: %s\n' "$gitea_version" >&2
@@ -54,11 +68,11 @@ if [[ -z "$theme_version" ]]; then
exec "$SCRIPT_DIRECTORY/install-gitea-github-theme.sh" --remove \
"$custom_path/public/assets/css" \
"$custom_path/templates" \
"$custom_path/.gitea-github-theme-files"
"$manifest_path"
fi
exec "$SCRIPT_DIRECTORY/install-gitea-github-theme.sh" \
"$theme_version" \
"$custom_path/public/assets/css" \
"$custom_path/templates" \
"$custom_path/.gitea-github-theme-files"
"$manifest_path"