diff options
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/test/add.sh | 4 | ||||
| -rw-r--r-- | ports/test/del.sh | 2 | ||||
| -rw-r--r-- | ports/test/pkg.conf | 26 | ||||
| -rw-r--r-- | ports/test/test.sh | 3 |
4 files changed, 7 insertions, 28 deletions
| diff --git a/ports/test/add.sh b/ports/test/add.sh index 1db96be..b7b595d 100644 --- a/ports/test/add.sh +++ b/ports/test/add.sh | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | . pkg.conf | 1 | . pkg.conf |
| 2 | set -e | 2 | set -e |
| 3 | 3 | ||
| 4 | gcc -static -fno-pie -O0 -g0 -s $CFLAGS -o "$pkg_name" -c "$pkg_name.c" $LDFLAGS | 4 | chmod +x test.sh |
| 5 | rx cp "$pkg_name" /usr/local/bin/"$pkg_name-mp" | 5 | cp test.sh /usr/local/bin/test-mp |
| diff --git a/ports/test/del.sh b/ports/test/del.sh index be1208c..af22f1e 100644 --- a/ports/test/del.sh +++ b/ports/test/del.sh | |||
| @@ -1,2 +1,4 @@ | |||
| 1 | . pkg.conf | 1 | . pkg.conf |
| 2 | set -e | 2 | set -e |
| 3 | |||
| 4 | rm /usr/local/bin/test-mp | ||
| diff --git a/ports/test/pkg.conf b/ports/test/pkg.conf index ccc7ea7..ef9234a 100644 --- a/ports/test/pkg.conf +++ b/ports/test/pkg.conf | |||
| @@ -1,29 +1,3 @@ | |||
| 1 | pkg_name="test" | 1 | pkg_name="test" |
| 2 | pkg_license="GPL-3.0-or-later" | 2 | pkg_license="GPL-3.0-or-later" |
| 3 | pkg_ver="1.0.0" | 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 | |||
| diff --git a/ports/test/test.sh b/ports/test/test.sh new file mode 100644 index 0000000..657ca5c --- /dev/null +++ b/ports/test/test.sh | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/usr/bin/env | ||
| 2 | |||
| 3 | echo "test." >&2 | ||
