eth-p / bat-extras

Bash scripts that integrate bat with various command line tools.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't make it work on termux ,the batman at least

rexackermann opened this issue · comments

batman gives an error:

-bx: 1: Syntax error: Unterminated quoted string

Building also fails,

./build.sh --minify=all --install --prefix=/data/data/com.termux/files/home/shell/bin
Installing to /data/data/com.termux/files/home/shell/bin.
Warning: cannot find shfmt. Unable to minify scripts.
Preparing scripts...
Building scripts...
    [1/7] /data/data/com.termux/files/home/bat-extras/src/bat-modules.sh
          Reading...
          Preprocessing...
          Minifying [skipped]
          Compressing [skipped]
          Building...
          Installing...
    [2/7] /data/data/com.termux/files/home/bat-extras/src/batdiff.sh
          Reading...
          Preprocessing...
          Minifying [skipped]
          Compressing [skipped]
          Building...
          Installing...
          Reading manual...
          Generating manual...
          Building...
          Installing manual...
    [3/7] /data/data/com.termux/files/home/bat-extras/src/batgrep.sh
          Reading...
          Preprocessing...
          Minifying [skipped]
          Compressing [skipped]
          Building...
          Installing...
          Reading manual...
          Generating manual...
          Building...
          Installing manual...
    [4/7] /data/data/com.termux/files/home/bat-extras/src/batman.sh
          Reading...
          Preprocessing...
          Minifying [skipped]
          Compressing [skipped]
          Building...
          Installing...
          Reading manual...
          Generating manual...
          Building...
          Installing manual...
    [5/7] /data/data/com.termux/files/home/bat-extras/src/batpipe.sh
          Reading...
          Preprocessing...
          Minifying [skipped]
          Compressing [skipped]
          Building...
          Installing...
          Reading manual...
          Generating manual...
          Building...
          Installing manual...
    [6/7] /data/data/com.termux/files/home/bat-extras/src/batwatch.sh
          Reading...
          Preprocessing...
          Minifying [skipped]
          Compressing [skipped]
          Building...
          Installing...
          Reading manual...
          Generating manual...
          Building...
          Installing manual...
    [7/7] /data/data/com.termux/files/home/bat-extras/src/prettybat.sh
          Reading...
          Preprocessing...
          Minifying [skipped]
          Compressing [skipped]
          Building...
          Installing...
          Reading manual...
          Generating manual...
          Building...
          Installing manual...

Verifying scripts...
batdiff:version failed.
batgrep:option_context failed.
batgrep:output_with_color failed.
batgrep:output_without_color failed.
batgrep:output_without_separator failed.
batgrep:regular_file failed.
batgrep:respects_bat_style failed.
batgrep:search_fixed failed.
batgrep:search_from_stdin failed.
batgrep:search_regex failed.
batgrep:symlink_file failed.
batgrep:version failed.
batman:version failed.
batpipe:batpipe_term_width failed.
batpipe:detected_bash_shell failed.
batpipe:detected_fish_shell skipped.
batpipe:viewer_gzip failed.
batwatch:displayed failed.
batwatch:help failed.
batwatch:version failed.
lib_pager:args_copied_from_bat_pager failed.
lib_pager:args_copied_from_pager failed.
lib_pager:bat_detection failed.
lib_pager:env_bat_pager failed.
lib_pager:env_no_pager failed.
lib_pager:less_args failed.
lib_pager:less_args_not_less failed.
lib_pager:less_detection failed.
lib_pager:less_version failed.
prettybat:read_from_pipe failed.
prettybat:read_from_pipe_with_formatter failed.
prettybat:version failed.
One or more tests failed.
Run './test.sh --failed' for more detailed information.

I'm not entirely sure how to go about fixing the test errors (Termux has a lot of weirdness with executables), but I fixed batman in 14f36f5.

Thanks

I'm not entirely sure how to go about fixing the test errors (Termux has a lot of weirdness with executables), but I fixed batman in 14f36f5.

The rest can be build on a different machine and then copied so I am hoping the others will work fine as long as I do that.Thanks for the support and since my problem seems to be sorted I am closing the issue.
Thanks Again.

There is a way to install it on termux using,

./build.sh --install --prefix=/data/data/com.termux/files/usr/ --no-verify

Is it possible to all it in the readme ,for someone who might want to install it in the future.I think it might help a few people.
Or add an if statement to detect termux and set the prefix automatically ? I have made PR #95 to implement it.

I merged your pull request. Thank you :)

I will be closing the issue since it has a workaround now.
PR for ease of build on termux : #95
And batman-fix
Thanks again.