gdrive-downloader
gdrive-downloader copied to clipboard
chmod flags not compatible with mac?
Hi, I'm trying to get this working on a Mac M1 running Mac OS Ventura (13.3.1). I've got Homebrew and used it to install both this script and bash 5.2.15.
The script exits after the "Enter Client ID" step, with the error "chmod: --: No such file or directory". I wasn't familiar with the double dash --
syntax, maybe it's not supported by the chmod
provided by MacOS?
Yup, same for FreeBSD. The script does this in case the filename starts with a -
to prevent chmod
interpreting as an option. A portable way to do this would be to prefix filenames that start with a -
with ./
.
I don't know why the script is chmod'ing files in the first place. It should just set a umask or fall back to the umask it inherits from the environment.
A portable way to do this would be to prefix filenames that start with a - with ./.
I tried that, but the script still exited. The only way I could get it to run was by removing all calls to chmod
; then it worked ok.
Hmm, i will try to fix.
A portable way to do this would be to prefix filenames that start with a - with ./.
I tried that, but the script still exited. The only way I could get it to run was by removing all calls to
chmod
; then it worked ok.
I didn't mean for you to prefix filenames. I meant that the script would need to be updated to remove --
and use ./$filename
instead in cases where $filename
does not start with /
. The reason the --
was put into the script was in case a filename starts with a -
to prevent chmod
from interpreting it as an option.