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
246 stars 41 forks source link

Added a bash version verification #26

Closed n0tnull closed 7 years ago

n0tnull commented 7 years ago

It will be more obvious for someone to know if their bash version is not capable of running this script.

IzzySoft commented 7 years ago

Thanks a lot, great idea! Let me just improve a minor thing: If there's no Bash, $BASH_VERSION will not be set. So I just changed that to ${BASH_VERSION:-(unknown)} for a clean error message. Though due to the #!/usr/bin/env bash it should never come to that :smile_cat:

n0tnull commented 7 years ago

That's right, I forgot to handle this error case, it's better now 👍 Can you update the wiki with the new exit code too ?

EDIT: There's no way for me to do a PR on the Wiki, so you can find the updated version here : https://github.com/n0tnull/Adebar/wiki/_compare/d69a3b4e120c2d24c7ce7d3aae4cf5207abd70fe

IzzySoft commented 7 years ago

Done, thanks! Yes, I also encountered that unfortunate restriction. But the only alternative doesn't work out either (having the Wiki publically editable). Which is why e.g. #7 is still open (and will remain open), so people can add device configurations there and I transfer it to the wiki.