what if not args given

This commit is contained in:
Andrew Hurley 2022-10-29 14:19:07 +11:00
parent 0f6bb41f30
commit c36ef943b6
1 changed files with 5 additions and 1 deletions

6
v2b.sh
View File

@ -72,7 +72,11 @@ TEMPF="$(mktemp -dt -p $PWD _XXXXXXXXXXXXXXX_)"
for VOL in ${VOLUMES}; do
if [[ $REMOVE == "true" ]]; then
TAR="${VOL#${1}_}.tar.bz2"
if [[ -v 1 ]]; then
TAR="${VOL#${1}_}.tar.bz2"
else
TAR="${VOL#*_}.tar.bz2"
fi
else
TAR="${VOL}.tar.bz2"
fi