diff options
| -rw-r--r-- | kj-arch-bin-wrapper/.SRCINFO | 10 | ||||
| -rw-r--r-- | kj-arch-bin-wrapper/.gitignore | 3 | ||||
| -rw-r--r-- | kj-arch-bin-wrapper/PKGBUILD | 74 |
3 files changed, 87 insertions, 0 deletions
diff --git a/kj-arch-bin-wrapper/.SRCINFO b/kj-arch-bin-wrapper/.SRCINFO new file mode 100644 index 0000000..75ae75f --- /dev/null +++ b/kj-arch-bin-wrapper/.SRCINFO @@ -0,0 +1,10 @@ +pkgbase = kj-arch-bin-wrapper + pkgdesc = kj_sh604's wrapper script for arch command (uname -m) + pkgver = 2026.01.13.2206 + pkgrel = 1 + url = https://www.gnu.org/software/coreutils/coreutils.html + arch = any + license = 0BSD + depends = coreutils + +pkgname = kj-arch-bin-wrapper diff --git a/kj-arch-bin-wrapper/.gitignore b/kj-arch-bin-wrapper/.gitignore new file mode 100644 index 0000000..0effd57 --- /dev/null +++ b/kj-arch-bin-wrapper/.gitignore @@ -0,0 +1,3 @@ +pkg/ +src/ +*.tar*
\ No newline at end of file diff --git a/kj-arch-bin-wrapper/PKGBUILD b/kj-arch-bin-wrapper/PKGBUILD new file mode 100644 index 0000000..9441485 --- /dev/null +++ b/kj-arch-bin-wrapper/PKGBUILD @@ -0,0 +1,74 @@ +pkgname=kj-arch-bin-wrapper +pkgver=$(date +%Y.%m.%d.%H%M) +pkgrel=1 +pkgdesc="kj_sh604's wrapper script for arch command (uname -m)" +arch=('any') +url="https://www.gnu.org/software/coreutils/coreutils.html" +license=('0BSD') +depends=('coreutils') + +pkgver() { + date +%Y.%m.%d.%H%M +} + +package() { + install -dm755 "$pkgdir/usr/bin" + cat > "$pkgdir/usr/bin/arch" << 'EOF' +#!/bin/sh +VERSION=$(date +%Y.%m.%d.%H%M) + +case "$1" in + --help) + cat << 'HELP' +usage: arch [OPTION]... +print machine architecture. + + --help display this help and exit + --version display version information +HELP + exit 0 + ;; + --version) + echo "arch $VERSION" + echo "licensed under the BSD Zero Clause License (0BSD)" + exit 0 + ;; + "") + # No arguments - just run uname -m + exec uname -m + ;; + *) + echo "arch: invalid option -- '$1'" >&2 + echo "try 'arch --help' for more information" >&2 + exit 1 + ;; +esac +EOF + + chmod 755 "$pkgdir/usr/bin/arch" + + install -dm755 "$pkgdir/usr/share/man/man1" + cat > "$pkgdir/usr/share/man/man1/arch.1" << 'MANPAGE' +.TH ARCH 1 "kj-arch-bin-wrapper" "User Commands" +.SH NAME +arch \- print machine hardware name (same as uname \-m) +.SH SYNOPSIS +.B arch +[\fIOPTION\fR]... +.SH DESCRIPTION +print machine architecture. +.TP +\fB\-\-help\fR +display this help and exit +.TP +\fB\-\-version\fR +display version information +.SH AUTHOR +wrapper script created by the `kj-arch-bin-wrapper` package. +.SH SEE ALSO +.BR uname (1), +.BR uname (2) +MANPAGE +} + +# vim:set ts=2 sw=2 et:
\ No newline at end of file |
