This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/unarchive
2020-04-20 10:38:19 -05:00

10 lines
253 B
Bash
Executable file

#!/usr/bin/env bash
archive_name="${1}"; shift
to_dir="$(basename "$archive_name")"
mkdir -p "${to_dir}"
pushd "${to_dir}" || ( echo "${to_dir} does not exist" ; exit 1 )
tar --zstd -xvf "${archive_name}"
echo "Unarchived to: ${to_dir}"
popd || exit 2