SHTOOL-VERSION.TMP(1)

πŸ“¦
version 2.0.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– SHTOOL-VERSION πŸ’–

okay bestie, gather round, because this is the shtool-version page from the GNU Portable Shell Tool and it's literally the little gremlin that keeps your version numbers from going feral. it lives in the GNU shtool manual, section 1. no cap. πŸ¦‹


✨ NAME ✨

shtool-version β€” the GNU shtool command that maintains your version information file. she's giving librarian energy, but for numbers. πŸ“š


🌸 SYNOPSIS 🌸

shtool version [-l|--language lang] [-n|--name name] [-p|--prefix
prefix] [-s|--set version] [-e|--edit] [-i|--increase knob]
[-d|--display type] file

πŸŽ€ DESCRIPTION πŸŽ€

so like, this command displays and maintains version information inside file. that's the whole job. she's focused. she's employed. she's thriving. πŸ’…

the version is always described as a triple <version,revision,level> and it's represented by a string that always matches the regular expression [0-9]+\.[0-9]+[sabp.][0-9]+. yes bestie, the pattern is the law. πŸ™

now for the nerdy part (affectionate): the hexadecimal format for a version v.rtl is VVRRTLL where

  • VV and RR directly correspond to v and r 🫢
  • T encodes the level type as 9, 2, 1, 0 (representing s, p/., b, a in this order)
  • LL is either directly corresponding to l, or set to 99 if the level type is s

like… it's giving encoding. it's giving bit-shuffling. iconic behavior honestly. ⭐


✨ OPTIONS ✨

the following command line options are available, mwah:

  • -v, --verbose β€” print verbose information during processing. she will tell you everything. oversharing as a service. πŸ—£οΈ
  • -l, --language lang β€” choose the format of the version file file. your options are lang="txt", ANSI C (lang="c"), M4 (lang="m4"), Perl (lang="perl") or Python (lang="python"). default is "txt". pick your fighter. 🌈
  • -n, --name name β€” name the program that the version is being maintained for. default is "unknown". bestie we can do better than unknown, please name your child. 😭
  • -p, --prefix prefix β€” (the page lowkey doesn't spell this one out, so we're just passing along the flag exactly as it's written, no guessing πŸ’€)
  • -s, --set version β€” set the version to version. just. straight up. assignment. periodt. πŸ‘‘
  • -e, --edit β€” interactively enter a new version. it will literally ask you. conversation-style. 🎀
  • -i, --increase knob β€” when option -i is used, the current version in file is updated by increasing one element of the version, where knob can be one of the following:
    • "v" for increasing the version by 1 (and resetting revision and level to 0)
    • "r" for increasing the revision by 1 (and resetting level to 0)
    • "l" for increasing the level by 1
  • -d, --display type β€” control the display type: "short" for a short version display, "long" for a longer version display, "hex" for a hexadecimal display of the version, and "libtool" for a format suitable for use with GNU libtool. choose your aesthetic. 🎨

🌟 EXAMPLE 🌟

here's how the girlies actually use her:

 #   shell script
 shtool version -l c -n FooBar -p foobar -s 1.2b3 version.c

 #   configure.in
 V=`shtool version -l c -d long version.c`
 echo "Configuring FooBar, Version $V"

ate. no crumbs. πŸ”₯


πŸ¦‹ HISTORY πŸ¦‹

the GNU shtool version command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1994 for OSSP eperl. it was later rewritten from scratch for inclusion into GNU shtool. glow-up of the century, fr fr. ✨


πŸ’œ SEE ALSO πŸ’œ


πŸ’€ heads up bestie: those are all the flags, don't go inventing new ones, the page said what it said.

and that's the whole vibe check! this page is from shtool 2.0.8, dated 18-Jul-2008 β€” yeah she's a vintage queen and she still serves πŸ‘‘πŸ’– bye ily, go bump your version numbers responsibly πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from