sethleedy / GRC-SECURITY-NOW-PODCAST-DOWNLOAD-SCRIPT

Purpose of this BASH script is to allow easy downloading of Security Now (GRC.Com/SecurityNow) podcasts and files related to it.
27 stars 4 forks source link

script can't find bzip2 #20

Open LwsBtlr opened 6 years ago

LwsBtlr commented 6 years ago
 ./grc-sn.sh -u
Seth Leedy's GRC Security Now Downloader v2.0
GitHub URL: https://github.com/sethleedy/GRC-SECURITY-NOW-PODCAST-DOWNLOAD-SCRIPT
Home URL: http://techblog.sethleedy.name/?p=24172
##########################################################
# Latest Episode: 659 Never a Dull Moment
##########################################################

Latest Episode is: 659
Latest Episode name is: Never a Dull Moment

Downloading episodes 1 to 1

No compression program found. Install a compression program like 7z or bzip2 to compress the cached search files.
No compression program found. Install a compression program like 7z or bzip2 to compress the cached search files.
% which bzip2
/usr/bin/bzip2
sethleedy commented 6 years ago

I am not sure what is happening here.

I used my current build and in the code told it to only use bzip2 by commenting out the other choices and setting bzip2 index to zero. It worked here.

type bzip2
bzip2 is /bin/bzip2
Seth Leedy's GRC Security Now Downloader v2.0
GitHub URL: https://github.com/sethleedy/GRC-SECURITY-NOW-PODCAST-DOWNLOAD-SCRIPT
Home URL: http://techblog.sethleedy.name/?p=24172
##########################################################
# Latest Episode: 659 Never a Dull Moment
##########################################################

Latest Episode is: 659
Latest Episode name is: Never a Dull Moment

Downloading episodes 1 to 1

Using compression program: bzip2
Uncompressing cache

Using compression program: bzip2
Compressing cache

Care to try the development branch ?

LwsBtlr commented 6 years ago

I made no changes to the script, and the update fails with the same error message (yes, twice). Downloaded the Development branch copied GRC-Downloader.sh to my GRC folder and got the same error.

bzip2 is in /usr/bin/ as always.

MacOS 10.13.4 :: Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64

sethleedy commented 6 years ago

I have not looked at a MacOS console in years. I'll have to get a virtual machine going to figure out what is differing.

Thanks for your feedback ! 👍

jontybrook commented 6 years ago

I'm having the same issue on Ubuntu 16.04. "No compression program found. Install a compression program like 7z or bzip2 to compress the cached search files."

thomaspdt commented 5 years ago

I'm having the same issue on Linux Mint Cinnamon 19. Both 7z and bzip2 are already installed.

sethleedy commented 5 years ago

Yeah, need to parse this out. Checking into it.

LwsBtlr commented 4 years ago

I’ve been running the script on my synology, but it still fails to work on Mac OS (10.13 10.14 10.15)

mfalkvidd commented 7 months ago

Below is the bash -x output for 2.2. Seems like the arithmetic on chi_num is wrong.

+ check_program_exists_arr[0]=7z
+ check_program_exists_arr[1]=gzip
+ check_program_exists_arr[2]=zip
+ check_program_exists_arr[3]=bzip2
+ check_program_exists_arr[4]=p7zip
+ check_program_exists_multi 'check_program_exists_arr[@]'
+ check_program_exists_arr=("${!1}")
+ chi_num=0
+ for chi in "${check_program_exists_arr[@]}"
++ which 7z
+ chi_num=0+1
+ for chi in "${check_program_exists_arr[@]}"
++ which gzip
+ chi_num=0+1+1
+ for chi in "${check_program_exists_arr[@]}"
++ which zip
+ false
+ echo 'Could not find: zip'
Could not find: zip
+ unset 'check_program_exists_arr[0+1+1]'
+ chi_num=0+1+1+1
+ for chi in "${check_program_exists_arr[@]}"
++ which bzip2
+ chi_num=0+1+1+1+1
+ for chi in "${check_program_exists_arr[@]}"
++ which p7zip
+ chi_num=0+1+1+1+1+1
+ echo 7z
7z
+ [[ 7z != '' ]]
+ false
+ echo ' '
sethleedy commented 7 months ago

I'll take a look at it.