mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-11-07 08:14:02 +01:00
build: Add termux support
sets the OPT_PREFIX to /data/data/com.termux/files/usr if termux is detected.
This commit is contained in:
parent
f47d9c4138
commit
03549d651a
12
build.sh
12
build.sh
@ -523,6 +523,18 @@ BUILD_FILTER=()
|
||||
DOCS_URL="https://github.com/eth-p/bat-extras/blob/master/doc"
|
||||
DOCS_MAINTAINER="eth-p <eth-p@hidden.email>"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Use a different default prefix when running on Termux.
|
||||
|
||||
if [[ "$(uname -o)" = "Android" ]] && [[ -n "${TERMUX_VERSION:-}" ]]; then
|
||||
OPT_PREFIX="/data/data/com.termux/files/usr/"
|
||||
else
|
||||
OPT_PREFIX="/usr/local"
|
||||
fi
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Parse arguments.
|
||||
|
||||
while shiftopt; do
|
||||
# shellcheck disable=SC2034
|
||||
case "$OPT" in
|
||||
|
Loading…
Reference in New Issue
Block a user