summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatheus Gabriel Werny de Lima2021-05-09 10:36:43 +0200
committerMatheus Gabriel Werny de Lima2021-05-09 10:36:43 +0200
commitbbb70d706e7985b45e5f766dffb09c29f1209e62 (patch)
tree05a7469a01005d2f0915922d47ff838c31baab31
parent17b0faa92bb1f3d22b774888417ce6653f9c5999 (diff)
downloadaur-bbb70d706e7985b45e5f766dffb09c29f1209e62.tar.gz
Checked the source code with shellcheck.
-rwxr-xr-xPKGBUILD58
1 files changed, 42 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index aa9218613eb..2bdc754deb2 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,69 +1,95 @@
+#!/bin/bash
# Maintainer: Matheus Gabriel Werny de Lima <matheusgwdl@protomail.com>
_pkgname=NBXplorer
-_pkgname_lc=$(echo ${_pkgname} | tr "[A-Z]" "[a-z]")
+_pkgname_lc=$(echo "${_pkgname}" | tr "[:upper:]" "[:lower:]")
+# shellcheck disable=SC2034
pkgname=nbxplorer-git
+# shellcheck disable=SC2034
pkgver=latest_tag
+# shellcheck disable=SC2034
pkgrel=1
+# shellcheck disable=SC2034
epoch=
+# shellcheck disable=SC2034
pkgdesc="A minimalist UTXO tracker for HD wallets."
+# shellcheck disable=SC2034
arch=("any")
url="https://github.com/dgarage/${_pkgname}"
+# shellcheck disable=SC2034
license=("MIT")
+# shellcheck disable=SC2034
groups=()
+# shellcheck disable=SC2034
depends=("aspnet-runtime-3.1" "bitcoin-daemon" "dotnet-sdk-3.1")
+# shellcheck disable=SC2034
makedepends=("git")
+# shellcheck disable=SC2034
checkdepends=()
+# shellcheck disable=SC2034
optdepends=()
-provides=(${_pkgname_lc})
+# shellcheck disable=SC2034
+provides=("${_pkgname_lc}")
+# shellcheck disable=SC2034
conflicts=("nbxplorer")
+# shellcheck disable=SC2034
replaces=()
+# shellcheck disable=SC2034
backup=()
+# shellcheck disable=SC2034
options=()
+# shellcheck disable=SC2034
install=
+# shellcheck disable=SC2034
changelog=
+# shellcheck disable=SC2034
source=("git+${url}.git")
+# shellcheck disable=SC2034
noextract=()
+# shellcheck disable=SC2034
md5sums=("SKIP")
+# shellcheck disable=SC2034
validpgpkeys=()
pkgver()
{
- cd ${srcdir}/${_pkgname}/
+ # shellcheck disable=SC2154
+ cd "${srcdir}"/"${_pkgname}"/ || exit
version=$(git describe --tags --abbrev=0)
- printf "%s" ${version} | sed "s/^v//;s/-/_/g;s/\//./g"
+ printf "%s" "${version}" | sed "s/^v//;s/-/_/g;s/\//./g"
}
build()
{
- cd ${srcdir}/${_pkgname}/
- git checkout tags/$(git describe --tags --abbrev=0)
+ cd "${srcdir}"/"${_pkgname}"/ || exit
+ git checkout tags/"$(git describe --tags --abbrev=0)"
./build.sh
}
package()
{
# Assure that the directories exist.
- mkdir -p ${pkgdir}/usr/bin/
- mkdir -p ${pkgdir}/usr/share/
- mkdir -p ${pkgdir}/usr/share/doc/${_pkgname}/
- mkdir -p ${pkgdir}/usr/share/licenses/${_pkgname}/
+ # shellcheck disable=SC2154
+ mkdir -p "${pkgdir}"/usr/bin/
+ mkdir -p "${pkgdir}"/usr/share/
+ mkdir -p "${pkgdir}"/usr/share/doc/"${_pkgname}"/
+ mkdir -p "${pkgdir}"/usr/share/licenses/"${_pkgname}"/
# Modify run.sh to state the absolute path of the .csproj.
echo -e "#!/bin/bash
-dotnet run --no-launch-profile --no-build -c Release -p \"/usr/share/${_pkgname}/NBXplorer/NBXplorer.csproj\" -- \${@}" > ${srcdir}/${_pkgname}/run.sh
+dotnet run --no-launch-profile --no-build -c Release -p \"/usr/share/${_pkgname}/NBXplorer/NBXplorer.csproj\" -- \${@}" > "${srcdir}"/"${_pkgname}"/run.sh
# Install the software.
- cp -r ${srcdir}/${_pkgname}/ ${pkgdir}/usr/share/
+ cp -r "${srcdir}"/"${_pkgname}"/ "${pkgdir}"/usr/share/
## Symlinking the scripts.
- ln -sfrT ${pkgdir}/usr/share/${_pkgname}/run.sh ${pkgdir}/usr/bin/${_pkgname_lc}
- chmod 755 ${pkgdir}/usr/bin/${_pkgname_lc}
+ ln -sfrT "${pkgdir}"/usr/share/"${_pkgname}"/run.sh "${pkgdir}"/usr/bin/"${_pkgname_lc}"
+ chmod 755 "${pkgdir}"/usr/bin/"${_pkgname_lc}"
# Install the documentation.
- install -Dm644 ${srcdir}/${_pkgname}/README.md ${pkgdir}/usr/share/doc/${_pkgname}/
+ install -Dm644 "${srcdir}"/"${_pkgname}"/README.md "${pkgdir}"/usr/share/doc/"${_pkgname}"/
# Install the license.
- install -Dm644 ${srcdir}/${_pkgname}/LICENSE ${pkgdir}/usr/share/licenses/${_pkgname}/
+ install -Dm644 "${srcdir}"/"${_pkgname}"/LICENSE "${pkgdir}"/usr/share/licenses/"${_pkgname}"/
}