IzzySoft / Adebar

Android DEvice Backup And Report, using Bash and ADB. Moved to https://codeberg.org/izzy/Adebar -- this is only a mirror now.
GNU General Public License v2.0
241 stars 41 forks source link

invalid option #21

Closed tristan-k closed 7 years ago

tristan-k commented 7 years ago

Running adebar-cli results in an error. Not sure what could be the reason for that. The device I'm trying to backup is a i9300 with Cyanogenmod 13 (Android 6.0.1).

./adebar-cli       
./adebar-cli: line 57: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
./adebar-cli: line 58: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
./adebar-cli: line 59: org.fdroid.fdroid: syntax error: invalid arithmetic operator (error token is ".fdroid.fdroid")
./adebar-cli: line 60: cm.aptoide.pt: syntax error: invalid arithmetic operator (error token is ".aptoide.pt")
./adebar-cli: line 61: com.android.vending: syntax error: invalid arithmetic operator (error token is ".android.vending")
./adebar-cli: line 62: com.google.android.feedback: syntax error: invalid arithmetic operator (error token is ".google.android.feedback")
./adebar-cli: line 63: de.robv.android.xposed.installer: syntax error: invalid arithmetic operator (error token is ".robv.android.xposed.installer")
./adebar-cli: line 64: org.fdroid.fdroid: syntax error: invalid arithmetic operator (error token is ".fdroid.fdroid")
./adebar-cli: line 65: cm.aptoide.pt: syntax error: invalid arithmetic operator (error token is ".aptoide.pt")
./adebar-cli: line 66: com.android.vending: syntax error: invalid arithmetic operator (error token is ".android.vending")
./adebar-cli: line 67: com.google.android.feedback: syntax error: invalid arithmetic operator (error token is ".google.android.feedback")
./adebar-cli: line 68: de.robv.android.xposed.installer: syntax error: invalid arithmetic operator (error token is ".robv.android.xposed.installer")
./adebar-cli: line 88: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]

Syntax: ./adebar-cli <config|target_directory> [suffix]
Syntax: ./adebar-cli <-a|--auto|-h|--help>

There are no more command-line parameters currently, everything is
controlled via config files. For details, please see the project's
wiki at https://github.com/IzzySoft/Adebar/wiki/Configuration
IzzySoft commented 7 years ago

You're using an old version of Bash obviously (pre-4.0). What does echo $BASH_VERSION yield for you? Adebar requires at least Bash 4.0. If you're using a Mac (which ships with an ancient Bash 3.5), you need to install Bash 4 separately and set it in your config via the BASH_LOCATION parameter. Support for that was contributed by @d5ve who might be able to assist. I have no Mac, so I cannot tell you how to install Bash4 on it.

d5ve commented 7 years ago

I used MacPorts to install a newer version of bash on my mac. This doesn't overwrite the current version, just installs the newer version in a different location. Once it's installed, Adebar will use it by default.

IzzySoft commented 7 years ago

Thanks, @d5ve – this time I've updated the corresponding Wiki page so those details are easy to find :innocent:

@tristan-k Please check there if all requirements were met at your end. Also please confirm what OS and version you're using.

tristan-k commented 7 years ago

Indeed I'm using Mac OS X (10.11.5). I will try to install a newer bash version later and report back here. Thanks for all the efforts.

IzzySoft commented 7 years ago

I assume this was solved via the newer version of Bash and d5ve's help, so I'm closing this issue now. If I was mistaken, be welcome to report back and we can reopen it.