list-versions.sh: use proper way to get path to ./scripts/properties.sh

This commit is contained in:
Leonid Pliushch 2020-10-30 21:31:48 +02:00
parent 5794e94b36
commit 1c69cda018
1 changed files with 6 additions and 6 deletions

View File

@ -1,22 +1,22 @@
#!/usr/bin/env bash
. scripts/properties.sh
SCRIPT_DIR=$(dirname "$(realpath "$0")")
. "$SCRIPT_DIR"/properties.sh
check_package() { # path
local path=$1
local pkg=$(basename $path)
local pkg=$(basename "$path")
TERMUX_PKG_REVISION=0
TERMUX_ARCH=aarch64
TERMUX_PREFIX=/data/data/com.termux/files/usr
. $path/build.sh
. "$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
for path in "${SCRIPT_DIR}"/../packages/*; do
(
check_package $path
check_package "$path"
)
done