parent
c80642512e
commit
370e88d581
|
@ -222,7 +222,7 @@ fi
|
||||||
|
|
||||||
# check selected compression tool is supported and installed
|
# check selected compression tool is supported and installed
|
||||||
if [[ -n $ziptool ]]; then
|
if [[ -n $ziptool ]]; then
|
||||||
if [[ ! " ${ZIPTOOLS[@]} " =~ " $ziptool " ]]; then
|
if [[ ! " ${ZIPTOOLS[@]} " =~ $ziptool ]]; then
|
||||||
error $LINENO "$ziptool is an unsupported ziptool."
|
error $LINENO "$ziptool is an unsupported ziptool."
|
||||||
exit -17
|
exit -17
|
||||||
else
|
else
|
||||||
|
@ -246,7 +246,7 @@ done
|
||||||
#Copy to new file if requested
|
#Copy to new file if requested
|
||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
f="$2"
|
f="$2"
|
||||||
if [[ -n $ziptool && "${f##*.}" == ${ZIPEXTENSIONS[$ziptool]} ]]; then # remove zip extension if zip requested because zip tool will complain about extension
|
if [[ -n $ziptool && "${f##*.}" == "${ZIPEXTENSIONS[$ziptool]}" ]]; then # remove zip extension if zip requested because zip tool will complain about extension
|
||||||
f="${f%.*}"
|
f="${f%.*}"
|
||||||
fi
|
fi
|
||||||
info "Copying $1 to $f..."
|
info "Copying $1 to $f..."
|
||||||
|
@ -392,7 +392,7 @@ if [[ -n $ziptool ]]; then
|
||||||
if [[ $parallel == true ]]; then
|
if [[ $parallel == true ]]; then
|
||||||
parallel_tool="${ZIP_PARALLEL_TOOL[$ziptool]}"
|
parallel_tool="${ZIP_PARALLEL_TOOL[$ziptool]}"
|
||||||
info "Using $parallel_tool on the shrunk image"
|
info "Using $parallel_tool on the shrunk image"
|
||||||
if ! $parallel_tool ${options} "$img"; then
|
if ! $parallel_tool "${options}" "$img"; then
|
||||||
rc=$?
|
rc=$?
|
||||||
error $LINENO "$parallel_tool failed with rc $rc"
|
error $LINENO "$parallel_tool failed with rc $rc"
|
||||||
exit -18
|
exit -18
|
||||||
|
@ -400,7 +400,7 @@ if [[ -n $ziptool ]]; then
|
||||||
|
|
||||||
else # sequential
|
else # sequential
|
||||||
info "Using $ziptool on the shrunk image"
|
info "Using $ziptool on the shrunk image"
|
||||||
if ! $ziptool ${options} $img; then
|
if ! $ziptool "${options}" "$img"; then
|
||||||
rc=$?
|
rc=$?
|
||||||
error $LINENO "$ziptool failed with rc $rc"
|
error $LINENO "$ziptool failed with rc $rc"
|
||||||
exit -19
|
exit -19
|
||||||
|
|
Loading…
Reference in New Issue