0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-13 14:09:19 +00:00
termux-packages/scripts/list-versions.sh
2023-09-03 08:46:13 +01:00

23 lines
495 B
Bash
Executable File

#!/usr/bin/env bash
SCRIPT_DIR=$(dirname "$(realpath "$0")")
. "$SCRIPT_DIR"/properties.sh
check_package() { # path
local path=$1
local pkg=$(basename "$path")
TERMUX_PKG_REVISION=0
TERMUX_ARCH=aarch64
. "$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 "${SCRIPT_DIR}"/../packages/*; do
(
check_package "$path"
)
done