10 lines
253 B
Bash
Executable file
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
|