Closed MasanoriYamada closed 6 years ago
Hi and thanks for reporting this. Let's see if we can get a little closer to fixing it. I don't have access to a Mac so I'm unable to test anything myself. ;)
Can you please post your $OSTYPE?
echo $OSTYPE
Can you also locate and upload the debug.log?
The debug log can be found by navigating to your /tmp directory, then looking for the matching sub-directory for your last run.
It will be called something like googliser.12345.xyz
The numbers (12345) will match the PID shown when you run googliser, and will change each time it's run.
xyz is a randomly generated string, so this could be anything.
Please post the log back here and I'll check it out. :)
Thanks for quick response.
Can you please post your $OSTYPE? OK!
$echo $OSTYPE
darwin17.0
Please post the log back here and I'll check it out. :)
I attached a debug.log. debug.log
Thank you for checking those.
I've just pushed a test script to this repo for checking argument parsing in the Mac environment. It's googliser but with 95% of the code removed (for downloading, gallery building, etc ...) and with debugging turned on. We'll use this one to work out where the problem is occurring. ;)
Please download it and make it executable:
wget https://raw.githubusercontent.com/teracow/googliser/master/parse-args-on-mac.sh && chmod +x parse-args-on-mac.sh
Then run it. It will only accept two parameters: -p
and -n
. An example session is shown below.
$ ./parse-args-on-mac.sh -p kittens -n 300
? $script_details: 'parse-args-on-mac.sh - 2018-04-24 PID:[12305]'
? $user_parameters_raw: '-p kittens -n 300'
= environment: '*** parameters ***'
? $user_query: 'kittens'
? $images_required: '300'
Due to the problem googliser currently has running in the Mac environment, I expect this script will not be able to parse the parameters correctly on your Mac. Can you try it and advise?
Yes, this script can't parse the parameters correctly on your Mac.
$ ./parse-args-on-mac.sh -p kittens -n 300
? $script_details: 'parse-args-on-mac.sh - 2018-04-24 PID:[99918]'
? $user_parameters_raw: '-p kittens -n 300'
= environment: '*** parameters ***'
? $user_query: ''
? $images_required: '25'
I've just made a small change to that same script. It now specifies the full path to the specific 'getopt' binary.
Can you please download and try it again?
Thank you! It can parse!
$ ./parse-args-on-mac.sh -p kittens -n 300
? $script_details: 'parse-args-on-mac.sh - 2018-04-25 PID:[5394]'
? $user_parameters_raw: '-p kittens -n 300'
= environment: '*** parameters ***'
? $user_query: 'kittens'
? $images_required: '300'
Cool. That turned out to be quite easy. ;)
OK, give me a few minutes - I'll update googliser with this modification and post back here when it's ready for you to test.
googliser has now been updated with that change. Can you please download and try it?
Thanks, googliser.sh can run on my mac!
That's great! Thank you for reporting this and for working with me to find a solution.
To finish up, this was fixed in https://github.com/teracow/googliser/commit/e82f2ca8094841e79572014ffc750835a5d1fe09
Hi, I got the same condition #13 . I can't get it to accept parameters on MacOS (10.13.4). I ensure gnu-getopt is installed. I used https://github.com/teracow/googliser/commit/2b332931506d13e5506eb98a7659b192660e0266.
I can not open help because googliser do not recognize arguments.
It's my env.