repositories / bugabinga.net
bugabinga.net
personal infrastructure for bugabinga!
owned by admin
services/pufferpanel/test-branding.sh
Raw#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
asset="${repo_root}/assets/pufferpanel/Nugu.tar"
[[ "$(tar -tf "${asset}")" == $'manifest.json\ntheme.css\nbugabinga.svg' ]]
tar -xOf "${asset}" manifest.json | cmp - "${repo_root}/services/pufferpanel/theme/manifest.json"
tar -xOf "${asset}" bugabinga.svg | cmp - "${repo_root}/assets/bugabinga.min.svg"
tar -xOf "${asset}" theme.css | cmp - "${repo_root}/assets/pufferpanel/theme.css"
tar -xOf "${asset}" manifest.json | jq -e '
.keepDefaultCss == true
and [.settings.mode.options[].value] == ["mode-auto", "mode-light", "mode-dark", "mode-dark-highcontrast"]
and .settings.fontFace.options[1].tkey == "common.theme.fontFace.A11y"
' >/dev/null
logo="$(base64 --wrap=0 "${repo_root}/assets/bugabinga.min.svg")"
grep -F "url('data:image/svg+xml;base64,${logo}')" "${repo_root}/assets/pufferpanel/theme.css" >/dev/null
for selector in '#app #root.mode-light' '#app #root.mode-dark' '#app #root.mode-auto'; do
grep -F "${selector}" "${repo_root}/assets/pufferpanel/theme.css" >/dev/null
done
printf '%s\n' 'Native Nugu theme archive, modes, accessibility controls, and original logo passed'