mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Making things more homogeneous in checks, some space removed.
This commit is contained in:
parent
0a63179529
commit
5f572c75d0
12
lrztar
12
lrztar
|
|
@ -78,7 +78,7 @@ Notice:
|
||||||
i="${i%.tar.*}"
|
i="${i%.tar.*}"
|
||||||
if ((v_O)); then
|
if ((v_O)); then
|
||||||
for x in ${!p[@]};do
|
for x in ${!p[@]};do
|
||||||
[ "${p[x]}"x == "-O"x ] && {
|
[[ ${p[x]} == "-O" ]] && {
|
||||||
p[x]=
|
p[x]=
|
||||||
p[$((x+1))]=
|
p[$((x+1))]=
|
||||||
break;
|
break;
|
||||||
|
|
@ -86,16 +86,14 @@ Notice:
|
||||||
done
|
done
|
||||||
i="${vopt[v_O]%/}"
|
i="${vopt[v_O]%/}"
|
||||||
x="${s##*/}"
|
x="${s##*/}"
|
||||||
if [[ $(shopt -s nullglob;
|
if [[ -d "$i/${x%.tar.*}" ]] && ! ((v_f)); then
|
||||||
shopt -s dotglob;
|
printf "lrztar: %s exists, use -f.\n" \
|
||||||
echo "$i"/"${x%.tar.*}"/*) ]] && ! ((v_f)); then
|
"$i/${x%.tar.*}"
|
||||||
printf "lrztar: %s exists, not empty, use -f.\n" \
|
|
||||||
"$i"/"${x%.tar.*}"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if ! [[ -d $i ]]; then
|
if ! [[ -d $i ]]; then
|
||||||
printf "lrztar: %s output path does not exist.\n" \
|
printf "lrztar: %s output path does not exist.\n" \
|
||||||
"$i"
|
"$i"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue