#!/bin/bash # Script to convert all files (tarballs in any format; just recognized # by 'tar') within an 'odir' to a unified '.tar.lz' format. # # The inputs are assumed to be formatted with 'NAME_VERSION', and only for # the names, we are currently assuming '.tar.*' (for the 'sed' # command). Please modify/generalize accordingly. # # It will unpack the source in a certain empty directory with the # 'tmpunpack' suffix, and rename the top directory to the requested format # of NAME-VERSION also. So irrespective of the name of the top original # tarball directory, the resulting tarball's top directory will have a name # formatting of NAME-VERSION. # # Discussion: https://savannah.nongnu.org/task/?15699 # # Copyright (C) 2022 Mohammad Akhlaghi # Copyright (C) 2022 Pedram Ashofteh Ardakani # Released under GNU GPLv3+ # Abort the script in case of an error. set -e # Default arguments odir= idir= quiet= basedir=$PWD scriptname=$0 # The --help output print_help() { cat <