41 lines
2.1 KiB
Bash
41 lines
2.1 KiB
Bash
# Maintainer: Kamack38 <kamack38.biznes@gmail.com>
|
|
_pkgname='oh-my-posh'
|
|
pkgname="${_pkgname}-bin"
|
|
pkgver=7.79.3
|
|
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=('69b6831e6c7923712fde726a9eb1f27a55f3fd34f4bdae28c60038daf49de83a')
|
|
sha256sums_x86_64=('de8c1fb3d3c906de05d036e0503f714541813ca583d70cb027270e54c406d2a8')
|
|
sha256sums_armv7h=('11fcfdab410ac628e22e5a2f1ca2c3ca181c6c843ffd1605887d4bf655b37e6c')
|
|
sha256sums_aarch64=('8f871fe468c4f4c0765ecde035ea110291f9de50ac3f0df986d675f3ea83841f')
|
|
source=("themes-${sha256sums}.zip::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/themes.zip")
|
|
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() {
|
|
if [[ "$CARCH" = 'x86_64' ]]; then
|
|
install -Dm 755 "posh-linux-amd64-${sha256sums_x86_64}" "${pkgdir}/usr/bin/oh-my-posh"
|
|
elif [[ "$CARCH" = 'armv7h' ]]; then
|
|
install -Dm 755 "posh-linux-arm-${sha256sums_armv7h}" "${pkgdir}/usr/bin/oh-my-posh"
|
|
elif [[ "$CARCH" = 'aarch64' ]]; then
|
|
install -Dm 755 "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"
|
|
}
|