Closed jetfir3 closed 2 years ago
I think we can just use curl -s https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh | bash -s -c
I think we can just use
curl -s https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh | bash -s -c
That command runs without error for you? For myself I get the following:
curl -sL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh | bash -s -c
bash: -c: option requires an argument
(23) Failed writing body
But I did just try -s -
instead of -s --
and that also succeeds and may be the shortest route to handling arguments.
From the bash man page:
A -- signals the end of options and disables further option processing. Any arguments after the -- are treated as filenames and arguments. An argument of - is equivalent to --.
ok. We can actually use anyone of the commands you mentioned first. Open a pr for it updating the readme. Ill merge.
pr made.
With the introduction of script arguments, we now need a way to pass the arguments when running the script directly from curl.
Currently "-c" is the only flag/argument supported.. so 2 methods to call this would be:
curl -sL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh | bash -s -- -c
andcurl -sL https://raw.githubusercontent.com/SpotX-CLI/SpotX-Mac/main/install.sh | bash -s /dev/stdin -c
Is
-s --
or-s /dev/stdin
preferred? Or does someone have a suggestion which is not listed above?