From 5e1035950a37ec7d498202a7eb8e76079cd703f3 Mon Sep 17 00:00:00 2001 From: Aroun Date: Fri, 13 Oct 2023 03:51:49 +0530 Subject: [PATCH] add: `oh-my-posh-git` (#4651) Co-authored-by: oklopfer <104327997+oklopfer@users.noreply.github.com> --- packagelist | 1 + .../oh-my-posh-git/oh-my-posh-git.pacscript | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 packages/oh-my-posh-git/oh-my-posh-git.pacscript diff --git a/packagelist b/packagelist index a63aea2ef2..c5ee79d8d9 100644 --- a/packagelist +++ b/packagelist @@ -278,6 +278,7 @@ obs-backgroundremoval-deb obs-backgroundremoval-git obs-ndi-deb obsidian-deb +oh-my-posh-git oil onefetch-bin onlyoffice-desktopeditors-deb diff --git a/packages/oh-my-posh-git/oh-my-posh-git.pacscript b/packages/oh-my-posh-git/oh-my-posh-git.pacscript new file mode 100755 index 0000000000..15a4c78838 --- /dev/null +++ b/packages/oh-my-posh-git/oh-my-posh-git.pacscript @@ -0,0 +1,27 @@ +name="oh-my-posh-git" +pkgname="oh-my-posh" +url="https://github.com/JanDeDobbeleer/oh-my-posh.git" +pkgver="18.11.0" +makedepends=("golang-go") +pacdeps=("nerd-fonts-hack") +breaks=("${pkgname}") +replace=("${pkgname}") +gives=("${pkgname}") +arch=('amd64') +pkgdesc="A prompt theme engine for any shell" +maintainer="Zahrun " +pkgver() { + git ls-remote "${url}" refs/heads/main | cut -f1 | cut -c1-8 +} + +build() { + cd src || exit 1 + go build -o "${pkgname}" +} + +package() { + sudo install -Dm644 COPYING -t "${pkgdir}/usr/share/licenses/${name}" + sudo install -Dm755 "src/${pkgname}" -t "${pkgdir}/usr/bin/" + sudo install -d "${pkgdir}/usr/share/oh-my-posh/themes" + sudo install -m 644 themes/* -t "${pkgdir}/usr/share/oh-my-posh/themes" +}