Cleanup TOS pages, prepare for new pages

This commit is contained in:
NeilClack
2026-03-13 18:16:47 -05:00
parent 403ec4db89
commit 74ee65c398
9 changed files with 29 additions and 77 deletions
+7 -3
View File
@@ -473,10 +473,14 @@ func AudioEnabled() bool {
return on == "true"
}
// resolveAssetsDir returns the assets directory by resolving relative to the
// running binary. For a binary at .../bin/rhemawave, assets are at
// .../share/rhemawave. Falls back to /usr/local/share/rhemawave.
// resolveAssetsDir returns the assets directory. If RHEMAWAVE_ASSETS_DIR is
// set, it is used directly (useful for debugging with dlv). Otherwise, it
// resolves relative to the running binary: .../bin/rhemawave → .../share/rhemawave.
// Falls back to /usr/local/share/rhemawave.
func resolveAssetsDir() string {
if dir := os.Getenv("RHEMAWAVE_ASSETS_DIR"); dir != "" {
return dir
}
exe, err := os.Executable()
if err == nil {
exe, err = filepath.EvalSymlinks(exe)