diff options
| author | Druid520 <r.ustydruid520@proton.me> | 2026-08-11 18:12:24 -0700 |
|---|---|---|
| committer | Druid520 <r.ustydruid520@proton.me> | 2026-08-11 18:12:24 -0700 |
| commit | 3dc4c90bbab3838eeef1ed5ab54f6fc5ed833aed (patch) | |
| tree | 9fdba678776a21cf8e42387c75568fd81a4413e0 /ports | |
| parent | 7166f04ef0668e9b36c08cf37a8006ab4bf2b0e3 (diff) | |
MOD: cleanup and updt
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/test/add.sh | 5 | ||||
| -rw-r--r-- | ports/test/del.sh | 2 | ||||
| -rw-r--r-- | ports/test/pkg.conf | 29 |
3 files changed, 36 insertions, 0 deletions
| diff --git a/ports/test/add.sh b/ports/test/add.sh new file mode 100644 index 0000000..1db96be --- /dev/null +++ b/ports/test/add.sh | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | . pkg.conf | ||
| 2 | set -e | ||
| 3 | |||
| 4 | gcc -static -fno-pie -O0 -g0 -s $CFLAGS -o "$pkg_name" -c "$pkg_name.c" $LDFLAGS | ||
| 5 | rx cp "$pkg_name" /usr/local/bin/"$pkg_name-mp" | ||
| diff --git a/ports/test/del.sh b/ports/test/del.sh new file mode 100644 index 0000000..be1208c --- /dev/null +++ b/ports/test/del.sh | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | . pkg.conf | ||
| 2 | set -e | ||
| diff --git a/ports/test/pkg.conf b/ports/test/pkg.conf new file mode 100644 index 0000000..ccc7ea7 --- /dev/null +++ b/ports/test/pkg.conf | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | pkg_name="test" | ||
| 2 | pkg_license="GPL-3.0-or-later" | ||
| 3 | pkg_ver="1.0.0" | ||
| 4 | pkg_repo="no-repo" | ||
| 5 | |||
| 6 | war() { | ||
| 7 | echo "warn: $1" >&2 | ||
| 8 | } | ||
| 9 | die() { | ||
| 10 | echo "err: $1" >&2 | ||
| 11 | exit 1 | ||
| 12 | } | ||
| 13 | ok() { | ||
| 14 | echo "ok: $1" >&2 | ||
| 15 | } | ||
| 16 | if command -v doas >/dev/null 2>&1; then | ||
| 17 | rx() { | ||
| 18 | doas "$@" | ||
| 19 | } | ||
| 20 | return | ||
| 21 | elif command -v sudo >/dev/null 2>&1; then | ||
| 22 | rx() { | ||
| 23 | sudo "$@" | ||
| 24 | } | ||
| 25 | return | ||
| 26 | else | ||
| 27 | die "permission elevator not found." | ||
| 28 | fi | ||
| 29 | |||
