Skip to content

Additional support for tZ and tz #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tests/fixtures/ipsum.txt.gzip
Binary file not shown.
3 changes: 2 additions & 1 deletion tests/test_file_extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


test_file_extract() {
for name in gz bz2 lzma xz
for name in gz bz2 lzma xz gzip
do
echo "Testing ${name}"
extract_archive $name
Expand All @@ -14,6 +14,7 @@ test_file_extract() {
extract_archive() {
ext=$1
cd $SHUNIT_TMPDIR

$PROGRAM $FIXTURES/ipsum.txt.${ext} > /dev/null
result_val=$?

Expand Down
7 changes: 4 additions & 3 deletions unfoo
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ for i in "$@"; do
;;

# tar'd and gzip'd or compress'd
*.tar.gz|*.tgz|*.tar.Z|*.tar.z)
*.tar.gz|*.tgz|*.tar.Z|*.tar.z|*.tZ|*.tz)
echo -n "$IAM: Decompressing and unpacking gzip'd tarball $ITIS..."
if [ $(tar ft "$i" | need_subdir) == 1 ]; then
dirname=$(basename $i | sed -r 's/(.tar.gz|.tgz|.tar.Z|.tar.z)$//g')
Expand Down Expand Up @@ -173,9 +173,10 @@ for i in "$@"; do
;;

# gzip'd or compress'd
*.gz|*.Z|*.z)
*.gz|*.Z|*.z|*.gzip)
echo -n "$IAM: Decompressing gzip archive $ITIS..."
gzip -dc "$i" > `basename "$i" .gz`
filename=$(basename $i | sed -r 's/(.gz|.gzip)$//g')
gzip -dc "$i" > $filename
check_success
;;

Expand Down