Honor the 2nd arg of R2PM_TGZ with ZIP files ##r2pm

This commit is contained in:
pancake 2019-06-20 13:48:56 +02:00
parent 2da973ed24
commit 69e13b5a51
1 changed files with 5 additions and 1 deletions

View File

@ -290,7 +290,11 @@ R2PM_TGZ() {
elif [ "`echo ${URL} | grep -e .txz -e tar`" ]; then
tar xvf "${TARBALL}"
elif [ "`echo ${URL} | grep -e .zip`" ]; then
unzip -o "${TARBALL}"
if [ -n "$2" ]; then
unzip -d "${DIR}" -o "${TARBALL}"
else
unzip "${TARBALL}"
fi
else
echo "Dunno"
exit 1