Untar It

SolidGroundUX DocumentationSolidGroundUX
NL

Restore selected files from a SolidGroundUX framework archive

Source: target-root/usr/local/libexec/solidgroundux/untar-it.sh

Restore selected files from a SolidGroundUX framework archive

Public functions

Internal functions
FunctionPurposeArgumentsOutput
_scan_cli_argsRecord which restore settings were supplied explicitly.- $@ — Original command-line arguments.—
_cleanup_stagingRemove the temporary extraction directory.——
_resolve_archiveResolve ARCHIVE_FILE against ARCHIVE_DIRECTORY.——
_list_archivesFind readable .tar.gz archives in ARCHIVE_DIRECTORY and store their basenames.——
_select_archiveDisplay available archives and resolve a numeric user selection.——
_validate_archive_entriesReject unsafe archive entry paths.——
_validate_parametersValidate restore settings.——
_getparametersResolve and confirm restore settings.——
_extract_stagingExtract the validated archive into temporary staging.——
_select_filesSelect staged files using directory and filename mask.——
_restore_filesRestore selected staged files beneath the target root.——

Description

Selects a .tar.gz archive, validates its entry paths, extracts it into a temporary staging directory, and restores files matching an optional directory and filename mask beneath a selected target root.

Usage

Run the executable from its shell command (or installed wrapper):

untar-it
untar-it --archive solidgroundux-20260804T010000.tar.gz --directory usr/local/lib/solidgroundux/common --match '*.sh'

Script-specific options:

  • --auto, -a: Restore without prompting.
  • --archive VALUE, -f: Archive filename or absolute path.
  • --archive-dir VALUE, -d: Directory containing framework archives.
  • --target VALUE, -t: Filesystem root beneath which files are restored.
  • --directory VALUE: Optional directory within the archive.
  • --match VALUE, -m: Filename or shell-style file mask.