termux-language-server
termux-language-server copied to clipboard
Treat all variables match `_.*` as optional
Any idea how to fix this?
I found out this happens because of line 4. The variable needs to be quoted, but that is not necessary as far as bash is concerned. Can you make it so that it doesn't have to be quoted?
You mean _pkgname result in this bug? So we should ignore all variables which name match _.*.
I cannot copy text from screenshot to test. Perhaps you can copy the entire code.
Here it is:
# Maintainer: txtsd <[email protected]>
pkgname=android_translation_layer
_pkgname=${pkgname//-/_}
pkgver=r651.e541d87f
pkgrel=2
_commit=e541d87fc255160ca0559015db0cc57042246fff
pkgdesc='A translation layer for running Android apps on a Linux system'
url='https://gitlab.com/android_translation_layer/android_translation_layer'
arch=(x86_64 aarch64 armv7h)
license=('GPL-3.0-or-later')
# libopensles-standalone is not strictly required but some Android applications depend on it
depends=(
alsa-lib
art_standalone
bionic_translation
cairo
ffmpeg
gcc-libs
gdk-pixbuf2
glib2
glibc
graphene
gtk4
harfbuzz
libdrm
libglvnd
libgudev
libopensles-standalone
libportal
libsoup3
pango
skia-sharp-atl
sqlite
vulkan-icd-loader
wayland
webkitgtk-6.0
)
makedepends=(
glib2-devel
java-runtime-common
jdk8-openjdk
meson
openxr
vulkan-headers
wayland-protocols
)
source=("${pkgname}-${_commit}.tar.gz::${url}/-/archive/${_commit}/${pkgname}-${_commit}.tar.gz")
sha256sums=('e16cf668e9b2d9c1149f16dcaa785faedfc7dc4a81e2cf62d1f0c35afbba67fa')
prepare() {
meson subprojects download --sourcedir="${pkgname}-${_commit}"
}
build() {
arch-meson "${pkgname}-${_commit}" build
meson compile -C build
}
check() {
meson test --no-rebuild --print-errorlogs -C build
}
package() {
depends+=(java-runtime)
meson install --no-rebuild -C build --destdir "${pkgdir}"
}
Yes, it is recommended for user defined variables to start with an underscore.