SHTOOL-TARBALL.TMP(1)

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

πŸ’– SHTOOL-TARBALL.TMP(1) πŸ’–

okay bestie, sit down, hydrate, because today we're talking about shtool-tarball β€” the GNU shtool command for rolling standardized tarballs. yes, the manual page is literally named SHTOOL-TARBALL.TMP(1) (it's a generated tmp page, we don't ask questions, we just vibe) and it lives inside the GNU Portable Shell Tool universe. πŸ¦‹


✨ NAME ✨

shtool-tarball β€” GNU shtool command for rolling standardized tarballs 🌈


πŸŽ€ SYNOPSIS πŸŽ€

shtool tarball [-t|--trace] [-v|--verbose] [-o|--output tarball]
[-c|--compress prog] [-d|--directory directory] [-u|--user user]
[-g|--group group] [-e|--exclude pattern] path [path ...]

πŸ’… DESCRIPTION πŸ’…

So this command's whole job is taking the input files sitting under path and rolling them up into a distribution tarball that tar(1) can happily extract later. it's giving ✨packaging✨.

Now, the four things that make an open source tarball actually good β€” the sacred checklist, the main character energy, periodt:

  1. it unpacks into a single top-level directory (no chaos splatter, we're not animals)
  2. that top-level directory matches the tarball filename (consistency queen πŸ‘‘)
  3. the tarball files should be sorted (order is self-care)
  4. arbitrary names for file owner and group (so it doesn't leak your username into the archive, lowkey important)

🌸 OPTIONS 🌸

here's the whole menu, no skips, no cuts, every single one:

  • -v, --verbose β€” display some processing information. it'll yap a little so you know what's happening πŸ’¬
  • -t, --trace β€” enable the output of the essential shell commands which are executed. so you can see exactly what it's running under the hood πŸ‘€
  • -o, --output tarball β€” output tarball to file tarball.
  • -c, --compress prog β€” pipe the resulting tarball through compression program prog. squash it 🫢
  • -d, --directory directory β€” sets the top-level directory into which the tarball unpacks. by default it's tarball without the trailing ".tar.*" extension. (so the name basically derives itself, cute)
  • -u, --user user β€” the user (owner) of files and directories in the tarball, set to user.
  • -g, --group group β€” the group of files and directories in the tarball, set to group.
  • -e, --exclude pattern β€” exclude files and directories matching a comma-separated list of regex pattern from the tarball. 🚫
heads up: directories are expanded before the filtering takes place. so like, the filter runs after the expansion, not before. iykyk.

the default filter pattern is "CVS,\\.cvsignore,\\.svn,\\.[oa]\$".


πŸ“ EXAMPLE πŸ“

steal this, it's literally in the page:

    #   Makefile.in
    dist:
        ...
        V=`shtool version -d short ...`; \
        shtool tarball -o foobar-$$V.tar.gz -c 'gzip -9' \
                       -u bar -g gnu -e 'CVS,\.cvsignore' .

look at that Makefile target doing the absolute most and eating every time πŸ”₯


🧚 HISTORY 🧚

The GNU shtool tarball command was originally written by Ralf S. Engelschall <rse@engelschall.com> in 1999 for GNU shtool. a legend, fr fr πŸ’œ


⭐ SEE ALSO ⭐

shtool(1), tar(1), compress(1).


and that's the whole page bestie, we got there πŸ’– this was shtool 2.0.8, dated 18-Jul-2008 β€” shoutout to the version and the date, iconic as always. now go roll a tarball, you got this πŸŽ€βœ¨

πŸ“¦ where this page comes from