@@ -396,16 +396,16 @@ delete_all() {
396396# Usage: archive_extract <archive> <destination directory>
397397archive_extract () {
398398 # # "tar --strip-components 1" permit to extract sources in /tmp/bashpack and don't create a new directory /tmp/bashpack/bashpack
399- tar -xf ${1} -C ${2} --strip-components 1
399+ # tar -xf ${1} -C ${2} --strip-components 1
400400
401- # # Testing if actually using a working tarball, and if not exiting script so we avoid breaking any installations.
402- # if file ${1} | grep -q 'gzip compressed data'; then
403- # # "tar --strip-components 1" permit to extract sources in /tmp/bashpack and don't create a new directory /tmp/bashpack/bashpack
404- # tar -xf ${1} -C ${2} --strip-components 1
405- # else
406- # error_tarball_non_working ${1}
407- # rm -f ${1}
408- # fi
401+ # Testing if actually using a working tarball, and if not exiting script so we avoid breaking any installations.
402+ if file ${1} | grep -q ' gzip compressed data' ; then
403+ # "tar --strip-components 1" permit to extract sources in /tmp/bashpack and don't create a new directory /tmp/bashpack/bashpack
404+ tar -xf ${1} -C ${2} --strip-components 1
405+ else
406+ error_tarball_non_working ${1}
407+ rm -f ${1}
408+ fi
409409}
410410export -f archive_extract
411411
@@ -475,9 +475,9 @@ download_cli() {
475475 else
476476 error_file_not_downloaded $archive_url
477477 fi
478- else
479- # Just call again the same function to get its error message
480- check_repository_reachability
478+ # else
479+ # # Just call again the same function to get its error message
480+ # check_repository_reachability
481481 fi
482482
483483}
0 commit comments