aboutsummaryrefslogtreecommitdiff
path: root/link_versions.sh
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-29 14:18:07 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-29 14:18:07 -0500
commitbb2f890fd470fff3e42698710b56c68164491d85 (patch)
tree13de7c4402037f0b655ddc809fad6e23454501fe /link_versions.sh
parent6db7b88c930657c38512709f808b422d39484a12 (diff)
Overhaul to versioning system (paths go tov2025-11-29
`/tomo@TOMOVERSION/lib@LIBVERSION` instead of using underscores. Tomo versioning now uses date-based versions.
Diffstat (limited to 'link_versions.sh')
-rw-r--r--link_versions.sh16
1 files changed, 2 insertions, 14 deletions
diff --git a/link_versions.sh b/link_versions.sh
index 47a70490..8dadbb52 100644
--- a/link_versions.sh
+++ b/link_versions.sh
@@ -1,17 +1,5 @@
#!/bin/sh
TOMO_PREFIX="$(awk -F= '/PREFIX/{print $2}' config.mk)"
cd "$TOMO_PREFIX/bin"
-
-commands="$(ls | awk -F '[v.]' '
- /^tomo_v/{
- if ($2 >= max_major) max_major=$2;
- if ($3 >= max_minor[$2]) max_minor[$2] = $3;
- link_tomo=1
- }
- END {
- for (major in max_minor) {
- if (max_major > 0) print "ln -fs tomo_v"major"."max_minor[major]" tomo"major
- }
- if (link_tomo) print "ln -fs tomo_v"max_major"."max_minor[max_major]" tomo"
- }')"
-eval "$commands"
+top_version="$(printf '%s\n' 'tomo@'* | sort -r | head -1)"
+ln -fs "$top_version" tomo