Disable progress bar on dumb terminals by default
The progress bar requires the terminal emulator to support ANSI escape sequences. Normally, TERM is set to dumb to indicate that the terminal emulator doesn't support any ANSI escape sequences. Attempting to use ANSI escape sequences on dumb terminals will lead to weird output. In order to make apk work by default, even on dumb terminals, this commit introduces an additional check which consults $TERM and disables the progress bar if it is set to "dumb".
Not sure if there is any interest in this. I do realize that usage of
dumb terminals is somewhat obscure. If you don't consider it worth-while
to make apk work on dumb terminals by default just close this MR