[archivers] xzize: shellcheck

master
Matteo Cypriani 3 years ago
parent dbb0d6bf3a
commit 3fb819f430

@ -1,6 +1,6 @@
#!/bin/sh
#
# xzize.sh, Copyright © 2010 Matteo Cypriani
# xzize.sh, Copyright © 2010, 2019 Matteo Cypriani
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
@ -16,12 +16,12 @@
# file is removed.
# If the file is already XZ compressed (.xz, .txz), nothing is done.
#set -x
set -u
# Destination file suffix when source file name suffix is a
# 3-letter compressed tar suffix:
TAR_XZ_EXT=txz
readonly TAR_XZ_EXT=txz
# Default compression level:
COMPRESSION_LEVEL=
@ -83,63 +83,63 @@ for SOURCE in "$@" ; do
# GZip
if test_extension "$SOURCE" gz ; then
ACTION=gunzip
ACTION="gunzip"
do_recompress
continue
fi
# GZipped Tar (.tgz)
if test_extension "$SOURCE" tgz $TAR_XZ_EXT ; then
ACTION=gunzip
ACTION="gunzip"
do_recompress
continue
fi
# BZip2
if test_extension "$SOURCE" bz2 ; then
ACTION=bunzip2
ACTION="bunzip2"
do_recompress
continue
fi
# BZipped Tar (.tbz)
if test_extension "$SOURCE" tbz $TAR_XZ_EXT ; then
ACTION=bunzip2
ACTION="bunzip2"
do_recompress
continue
fi
# BZipped Tar (.tb2)
if test_extension "$SOURCE" tb2 $TAR_XZ_EXT ; then
ACTION=bunzip2
ACTION="bunzip2"
do_recompress
continue
fi
# LZMA
if test_extension "$SOURCE" lzma ; then
ACTION=unlzma
ACTION="unlzma"
do_recompress
continue
fi
# LZMA compressed Tar (.tlz)
if test_extension "$SOURCE" tlz $TAR_XZ_EXT ; then
ACTION=unlzma
ACTION="unlzma"
do_recompress
continue
fi
# Compress
if test_extension "$SOURCE" Z ; then
ACTION=uncompress
ACTION="uncompress"
do_recompress
continue
fi
# Compressed Tar (.taz)
if test_extension "$SOURCE" taz $TAR_XZ_EXT ; then
ACTION=uncompress
ACTION="uncompress"
do_recompress
continue
fi

Loading…
Cancel
Save