summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlaus Alexander Seistrup2023-02-20 08:18:16 +0100
committerKlaus Alexander Seistrup2023-02-20 08:18:16 +0100
commit30474f914755f00b28306e9ad6ea0db43d450c04 (patch)
tree010e0e4c57ca7449795d9e470a119e52b8588361
downloadaur-30474f914755f00b28306e9ad6ea0db43d450c04.tar.gz
Initial commit
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD20
-rw-r--r--hx.sh24
3 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4e4fbb3bc6cf
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = usrbinhx
+ pkgdesc = Provide /usr/bin/hx for the helix editor
+ pkgver = 2023.02.20
+ pkgrel = 1
+ url = https://codeberg.org/kas/gists
+ arch = any
+ license = AGPL3
+ depends = helix
+ conflicts = hex
+ source = hx.sh
+ sha256sums = a4c0915dc04d642a176dca205c3b41e4947def6a9f1afd01b44c8c2ef9980a9c
+
+pkgname = usrbinhx
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cc7b17d8ffd4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,20 @@
+# Maintainer: Klaus Alexander Seistrup <klaus@seistrup.dk>
+# -*- mode: sh -*-
+
+pkgname='usrbinhx'
+pkgver='2023.02.20'
+pkgrel=1
+pkgdesc='Provide /usr/bin/hx for the helix editor'
+arch=('any')
+url='https://codeberg.org/kas/gists'
+license=('AGPL3')
+conflicts=('hex')
+depends=('helix')
+source=('hx.sh')
+sha256sums=('a4c0915dc04d642a176dca205c3b41e4947def6a9f1afd01b44c8c2ef9980a9c')
+
+package() {
+ install -Dm0755 'hx.sh' "$pkgdir/usr/bin/hx"
+}
+
+# eof
diff --git a/hx.sh b/hx.sh
new file mode 100644
index 000000000000..054582a3d9a9
--- /dev/null
+++ b/hx.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+ME="${0##*/}"
+
+# Copyright © 2022 Klaus Alexander Seistrup <klaus@seistrup.dk>
+# Licensed under the GNU Affero General Public License v3+.
+#
+# Updated: 2023-02-20
+
+die() {
+ printf '%s: %s\n' "$ME" "$*" >&2
+ exit 1
+}
+
+export HELIX_HX='/usr/lib/helix/hx'
+export HELIX_RUNTIME='/var/lib/helix/runtime'
+
+test -x "$HELIX_HX" || die 'cannot find helix:' "$HELIX_HX"
+test -d "$HELIX_RUNTIME" || die 'no such directory:' "$HELIX_RUNTIME"
+
+exec "$HELIX_HX" "$@"
+exit 127
+
+# eof