Navigation Menu

Skip to content

Commit

Permalink
[fix] kodev update $VERSION for run android (#3801)
Browse files Browse the repository at this point in the history
As in 1606137, leftover from #3723.

Also replaced a few non-standard `which` by `command -v` as per new shellcheck rule.
See https://github.com/koalaman/shellcheck/wiki/SC2230
  • Loading branch information
Frenzie committed Mar 26, 2018
1 parent 7cbfcec commit fb6dbf0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions kodev
Expand Up @@ -2,6 +2,7 @@

CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
VERSION=$(git describe HEAD)
VERSION=${VERSION}_$(git describe HEAD | xargs git show -s --format=format:"%cd" --date=short)

# Default Android build to arm.
ANDROID_ARCH=${ANDROID_ARCH:-arm}
Expand Down Expand Up @@ -323,7 +324,7 @@ ${SUPPORTED_RELEASE_TARGETS}"
done

if [ "${ignore_translation}" -eq 0 ]; then
if which tx>/dev/null; then
if command -v tx>/dev/null; then
make po || {
echo "ERROR: failed to fetch translation."
echo "Tip: Use --ignore-translation OPTION if you want to build a release without translation."
Expand Down Expand Up @@ -358,10 +359,10 @@ ${SUPPORTED_RELEASE_TARGETS}"
android)
kodev-build android
export PATH=$PATH:${CURDIR}/base/toolchain/android-sdk-linux/tools
which android &>/dev/null || {
command -v android &>/dev/null || {
make -C "${CURDIR}/base/toolchain" android-sdk
}
ANDROID_HOME=$(dirname "$(dirname "$(which android)")")
ANDROID_HOME=$(dirname "$(dirname "$(command -v android)")")
export ANDROID_HOME
export PATH=$PATH:${NDK}
make TARGET=android update
Expand Down Expand Up @@ -559,7 +560,7 @@ TARGET:
# run with catchsegv by default when it is available
# see https://github.com/koreader/koreader/issues/2878#issuecomment-326796777
if command -v catchsegv >/dev/null; then
CATCHSEGV=$(which catchsegv)
CATCHSEGV=$(command -v catchsegv)
fi

KOREADER_COMMAND="${CATCHSEGV} ./reader.lua -d"
Expand Down

0 comments on commit fb6dbf0

Please sign in to comment.