2022-04-04 17:34:13 +02:00
|
|
|
# Maintainer: Kamack38 <kamack38.biznes@gmail.com>
|
|
|
|
_pkgname='oh-my-posh'
|
|
|
|
pkgname="${_pkgname}-bin"
|
2022-05-06 13:39:51 +02:00
|
|
|
pkgver=7.79.0
|
2022-04-04 17:34:13 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="A prompt theme engine for any shell."
|
2022-04-26 22:05:27 +02:00
|
|
|
arch=('x86_64' 'armv7h' 'aarch64')
|
2022-04-04 17:34:13 +02:00
|
|
|
url="https://github.com/JanDeDobbeleer/oh-my-posh"
|
|
|
|
license=('MIT')
|
2022-04-26 22:05:27 +02:00
|
|
|
makedepends=('curl' 'grep' 'sed' 'unzip')
|
2022-04-04 17:34:13 +02:00
|
|
|
provides=("${_pkgname}")
|
|
|
|
conflicts=("${_pkgname}")
|
2022-05-06 13:56:36 +02:00
|
|
|
source=("themes-${pkgver}.zip::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/themes.zip")
|
|
|
|
source_x86_64=("posh-linux-amd64-${pkgver}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-amd64")
|
|
|
|
source_armv7h=("posh-linux-arm-${pkgver}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-arm")
|
|
|
|
source_aarch64=("posh-linux-arm64-${pkgver}::https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$pkgver/posh-linux-arm64")
|
2022-04-26 22:05:27 +02:00
|
|
|
noextract=('themes.zip')
|
2022-05-06 13:39:51 +02:00
|
|
|
sha256sums=('b9f5b0367e7d3f55793212011b8a5f991da7f3aa65cbda0f09535432a5d6aac0')
|
|
|
|
sha256sums_x86_64=('297d0d0b625e9eb64c0ee48a80562aa398f062ce18a1cf09588493298aeb4e99')
|
|
|
|
sha256sums_armv7h=('163d576b54362cbb765e15627fbe5342bc18d79229d5ab8deb2f7f6648b485a7')
|
|
|
|
sha256sums_aarch64=('ecb0428f73360e59cd4175e862f208fcacacdfd6fa855ef0f327e98d40f0e1d6')
|
2022-04-04 17:34:13 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2022-04-05 15:52:39 +02:00
|
|
|
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
|
2022-04-04 17:34:13 +02:00
|
|
|
sed -E 's/.*"([^"]+)".*/\1/' |
|
|
|
|
sed 's/v//'
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-04-26 22:05:27 +02:00
|
|
|
if [[ "$CARCH" = 'x86_64' ]]; then
|
2022-05-06 13:56:36 +02:00
|
|
|
install -Dm 755 "posh-linux-amd64-${pkgver}" "${pkgdir}/usr/bin/oh-my-posh"
|
2022-04-26 22:05:27 +02:00
|
|
|
elif [[ "$CARCH" = 'armv7h' ]]; then
|
2022-05-06 13:56:36 +02:00
|
|
|
install -Dm 755 "posh-linux-arm-${pkgver}" "${pkgdir}/usr/bin/oh-my-posh"
|
2022-04-26 22:05:27 +02:00
|
|
|
elif [[ "$CARCH" = 'aarch64' ]]; then
|
2022-05-06 13:56:36 +02:00
|
|
|
install -Dm 755 "posh-linux-arm64-${pkgver}" "${pkgdir}/usr/bin/oh-my-posh"
|
2022-04-26 22:05:27 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p "${pkgdir}/usr/share/oh-my-posh/themes"
|
2022-05-06 13:56:36 +02:00
|
|
|
unzip "${srcdir}/themes-${pkgver}.zip" -d "${pkgdir}/usr/share/oh-my-posh/themes"
|
2022-04-04 17:34:13 +02:00
|
|
|
}
|