cine-io/android-ffmpeg-with-rtmp

running ./build.sh results in bash complaining about invalid option

Closed this issue · 5 comments

Following the directions on the main page,

cd android-ffmpeg-with-rtmp
./build.sh

gives this:

/bin/bash: - : invalid option
Usage:  /bin/bash [GNU long option] [option] ...
    /bin/bash [GNU long option] [option] script-file ...
GNU long options:
    --debug
    --debugger
    --dump-po-strings
    --dump-strings
    --help
    --init-file
    --login
    --noediting
    --noprofile
    --norc
    --posix
    --rcfile
    --restricted
    --verbose
    --version
Shell options:
    -ilrsD or -c command or -O shopt_option         (invocation only)
    -abefhkmnptuvxBCHP or -o option

I also tried running it with sh build.sh, but then it goes

build.sh: line 4: source: _build_openssl.sh: file not found

It might be something obvious, but I'm rather new to linux.

@Soukyuu, what version of bash are you running? It sounds like it doesn't understand the -O extglob option. Try this:

bash --version

Reply with your version number. Then try this to see if you get an error:

bash -O extglob

bash is

GNU bash, version 4.3.18(1)-release (x86_64-unknown-linux-gnu)

and

bash -O extglob

does not throw an error (doesn't display anything). I tried updating it to 4.3.22 and nothing changed.
I'm on arch linux x86_64 if it matters.

That's odd, @Soukyuu -- I was able to reproduce the error on Ubuntu.

I changed build.sh -- see if the new version works for you.

it is running now, @jeffreywescott, thanks!

Hi. We are trying to run a script to restart all weblogic instances on rhel 7 but the log show next error:

/etc/init.d/cognos restartall > /opt/cognos/cron_restart.log 2>&1

LOG FILE:
: invalid option
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--rpm-requires
--restricted
--verbose
--version
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option

How can I fix it? i have:
bash --version
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)

uname -r

3.10.0-693.21.1.el7.x86_64