termux-packages/scripts/list-versions.sh
Leonid Pliushch b99704569b scripts/list-versions.sh: set TERMUX_PREFIX variable
Fixes

 dirname: missing operand
 Try 'dirname --help' for more information.

when sourcing some build.sh.
2020-05-19 15:15:09 +03:00

23 lines
470 B
Bash
Executable File

#!/usr/bin/env bash
. scripts/properties.sh
check_package() { # path
local path=$1
local pkg=$(basename $path)
TERMUX_PKG_REVISION=0
TERMUX_ARCH=aarch64
TERMUX_PREFIX=/data/data/com.termux/files/usr
. $path/build.sh
if [ "$TERMUX_PKG_REVISION" != "0" ] || [ "$TERMUX_PKG_VERSION" != "${TERMUX_PKG_VERSION/-/}" ]; then
TERMUX_PKG_VERSION+="-$TERMUX_PKG_REVISION"
fi
echo "$pkg=$TERMUX_PKG_VERSION"
}
for path in packages/*; do
(
check_package $path
)
done