cine-io / android-ffmpeg-with-rtmp

script(s) to build ffmpeg for android, including support for RTMP (and OpenSSL)
242 stars 106 forks source link

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

Closed Soukyuu closed 10 years ago

Soukyuu commented 10 years ago

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.

jeffreywescott commented 10 years ago

@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
Soukyuu commented 10 years ago

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.

jeffreywescott commented 10 years ago

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.

Soukyuu commented 10 years ago

it is running now, @jeffreywescott, thanks!

eespejelc commented 6 years ago

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