47 lines
2.4 KiB
Bash
47 lines
2.4 KiB
Bash
# Maintainer: Kamack38 <kamack38.biznes@gmail.com>
|
|
_pkgname='oh-my-posh'
|
|
pkgname="${_pkgname}-bin"
|
|
pkgver=8.20.1
|
|
pkgrel=1
|
|
pkgdesc="A prompt theme engine for any shell."
|
|
arch=('x86_64' 'armv7h' 'aarch64')
|
|
url="https://github.com/JanDeDobbeleer/oh-my-posh"
|
|
license=('MIT')
|
|
makedepends=('curl' 'grep' 'sed' 'unzip')
|
|
provides=("${_pkgname}")
|
|
conflicts=("${_pkgname}")
|
|
sha256sums=('273698f44960c9a5cb6c4c151dc1d6f6da7733de3d8b8475f43690c7c616e3f4'
|
|
'a5308c4e51268229a039ec4ec9a251a4cdb89d9380383e6e13aeba64a74f19ad')
|
|
sha256sums_x86_64=('fd6f14d5deafa1a9411b3c364d364a9930cf180959c649308b8c98b6068850fc')
|
|
sha256sums_armv7h=('d0a8f33b4f31df860c0e94829d2165254cfe000a912d898b78402d714be78a7a')
|
|
sha256sums_aarch64=('dc284306b82374a8a50bafe0eaadd08f3a0421982d9ed4d1c10e099a2b41b491')
|
|
source=(
|
|
"themes-${sha256sums[0]}.zip::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/themes.zip"
|
|
"LICENSE-${sha256sums[1]}::https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v${pkgver}/COPYING"
|
|
)
|
|
source_x86_64=("posh-linux-amd64-${sha256sums_x86_64}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-amd64")
|
|
source_armv7h=("posh-linux-arm-${sha256sums_armv7h}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-arm")
|
|
source_aarch64=("posh-linux-arm64-${sha256sums_aarch64}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-arm64")
|
|
noextract=('themes.zip')
|
|
|
|
pkgver() {
|
|
curl --silent -L "https://api.github.com/repos/JanDeDobbeleer/oh-my-posh/releases/latest" | # Get latest release from GitHub api
|
|
grep '"tag_name":' | # Get tag line
|
|
sed -E 's/.*"([^"]+)".*/\1/' |
|
|
sed 's/v//'
|
|
}
|
|
|
|
package() {
|
|
install -Dm 644 "LICENSE-${sha256sums[1]}" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
|
|
if [[ "$CARCH" = 'x86_64' ]]; then
|
|
install -Dm 755 "${srcdir}/posh-linux-amd64-${sha256sums_x86_64}" "${pkgdir}/usr/bin/oh-my-posh"
|
|
elif [[ "$CARCH" = 'armv7h' ]]; then
|
|
install -Dm 755 "${srcdir}/posh-linux-arm-${sha256sums_armv7h}" "${pkgdir}/usr/bin/oh-my-posh"
|
|
elif [[ "$CARCH" = 'aarch64' ]]; then
|
|
install -Dm 755 "${srcdir}/posh-linux-arm64-${sha256sums_aarch64}" "${pkgdir}/usr/bin/oh-my-posh"
|
|
fi
|
|
|
|
mkdir -p "${pkgdir}/usr/share/oh-my-posh/themes"
|
|
unzip "${srcdir}/themes-${sha256sums}.zip" -d "${pkgdir}/usr/share/oh-my-posh/themes"
|
|
}
|