Skip to content

Commit 9621867

Browse files
ggtrdggtrd
authored andcommitted
Rollback archive extract
1 parent f13d00c commit 9621867

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

bashpack.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -396,16 +396,16 @@ delete_all() {
396396
# Usage: archive_extract <archive> <destination directory>
397397
archive_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
}
410410
export -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

Comments
 (0)