aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CLAUDE.md6
-rw-r--r--nvchecker.toml2
-rwxr-xr-xnvtable16
3 files changed, 6 insertions, 18 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 01ed26d..bfb2487 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -72,10 +72,8 @@ the rest, and they are separate because the mappings differ per direction:
SlackBuild directory (`kitty` → `kitty-bin`). Adding one map for both breaks
the other direction.
-**Installed version** resolves through four sources in order: the `OPT_JSON`
-map (apps unpacked under `/opt` that are none of the below, currently Typora,
-declared as `<path>:<jq filter>`), `/var/log/packages`, the appimage-updater
-state file, then `flatpak list`.
+**Installed version** resolves through three sources in order:
+`/var/log/packages`, the appimage-updater state file, then `flatpak list`.
**Repo version** is the `VERSION=` line from
`<repo>/<category>/<pkg>/<pkg>.info`. Note the category level: `.info` files sit
diff --git a/nvchecker.toml b/nvchecker.toml
index 0c0569e..5a7391c 100644
--- a/nvchecker.toml
+++ b/nvchecker.toml
@@ -392,7 +392,7 @@ prefix = "v"
# Proprietary, no git repo. The Linux changelog is the only per-platform feed:
# dev_update.xml carries the macOS dev channel and reports a different version.
-[Typora]
+[Typora] # repo=my
source = "regex"
url = "https://typora.io/releases/linux"
regex = "<h2>([0-9]+\\.[0-9]+\\.[0-9]+)</h2>"
diff --git a/nvtable b/nvtable
index 4955f92..9d02c67 100755
--- a/nvtable
+++ b/nvtable
@@ -38,6 +38,7 @@ REPOS=(
declare -A ALIAS=(
[kvantum]="kvantum-qt5 kvantum-qt6"
[metasploit-framework]="metasploit-framework-bin"
+ [Typora]="typora-bin"
)
# Stanza name -> SlackBuild directory name, where the repo dir differs from the
@@ -47,13 +48,7 @@ declare -A REPO_ALIAS=(
[claude-code]="claude-code-bin"
[kvantum]="kvantum-qt6"
[metasploit-framework]="metasploit-framework-bin"
-)
-
-# Stanza name -> JSON file carrying the installed version, for apps unpacked
-# under /opt that are neither a package, an AppImage, nor a flatpak. Value is
-# "<path>:<jq filter>".
-declare -A OPT_JSON=(
- [Typora]="/opt/Typora-linux-x64/resources/package.json:.version"
+ [Typora]="typora-bin"
)
SHOW_ALL=0; NO_TAKE=0; NO_COLOR=0; NO_EMOJI=0
@@ -147,12 +142,7 @@ if command -v flatpak >/dev/null 2>&1; then
fi
installed_of() { # echoes "version" or "" ; handles alias + case-insensitive
- local n=$1 cand v spec f
- if [[ -n ${OPT_JSON[$n]:-} ]]; then
- spec=${OPT_JSON[$n]}; f=${spec%%:*}
- [[ -r $f ]] && v=$(jq -r "${spec#*:} // empty" "$f" 2>/dev/null) \
- && [[ -n $v ]] && { echo "$v"; return; }
- fi
+ local n=$1 cand v
for cand in ${ALIAS[$n]:-$n}; do
# Anchored lookup first: correct even when VERSION contains a dash.
v=$(pkg_version "$cand") && { echo "$v"; return; }