diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-14 00:12:54 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-14 00:12:54 +0200 |
| commit | 5e416d613f61cfc16277d343e30c3c8a00b21b35 (patch) | |
| tree | d73b06932e9806c21f4ff7a8bf3f985b361f82cf /internal/app/script.go | |
| parent | 956f84321860bd8e318545564474037cbd3b6fd9 (diff) | |
remove version and some refactoring
Diffstat (limited to 'internal/app/script.go')
| -rw-r--r-- | internal/app/script.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/internal/app/script.go b/internal/app/script.go deleted file mode 100644 index 2701cb2..0000000 --- a/internal/app/script.go +++ /dev/null @@ -1,29 +0,0 @@ -package app - -import ( - "os" - "path/filepath" -) - -// ScriptPath returns the path to the loadbars-remote.sh script. -// It looks for scripts/loadbars-remote.sh relative to the executable, then current dir. -func ScriptPath() string { - exe, err := os.Executable() - if err == nil { - dir := filepath.Dir(exe) - // When installed: exe is /usr/bin/loadbars, script might be /usr/share/loadbars/scripts/ - for _, sub := range []string{"scripts/loadbars-remote.sh", "../scripts/loadbars-remote.sh", "../../scripts/loadbars-remote.sh"} { - p := filepath.Join(dir, sub) - if _, err := os.Stat(p); err == nil { - return p - } - } - } - // Development: run from repo root - if p, err := filepath.Abs("scripts/loadbars-remote.sh"); err == nil { - if _, err := os.Stat(p); err == nil { - return p - } - } - return "scripts/loadbars-remote.sh" -} |
