summaryrefslogtreecommitdiff
path: root/test/librestage.d/PKGBUILD-hello
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-01 19:23:19 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 20:01:05 -0600
commit8e5744170c30d50ef1f3e3a3e52c595870c6e50a (patch)
tree797e4d33a4e0da370e68ebcd9a80b9daa0d7fa52 /test/librestage.d/PKGBUILD-hello
parentabac8a47a9e8bbccb7eb866c2fa0796cc5c39edc (diff)
librestage: clean up, add unit tests
Contained the text "# TODO refactor this", and I can't just stick to that fragment of code, can I? I actually didn't change too much, despite what the diff looks like. - move everything into a main() routine - redo the usage() text - rename a few variables - fix where "${#repos}" should have been "${#repos[@]}" - use [[...]] instead of [...] - use "if A; then B; else C; fi" instead of "A || C && B" - use CARCH instead of looping over every possible architecture. - only look for files that match PKGEXT, as set in makepkg.conf - pull out duplicate code for error handling - don't warn when creating "staging/REPONAME"
Diffstat (limited to 'test/librestage.d/PKGBUILD-hello')
-rw-r--r--test/librestage.d/PKGBUILD-hello19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/librestage.d/PKGBUILD-hello b/test/librestage.d/PKGBUILD-hello
new file mode 100644
index 0000000..706cb24
--- /dev/null
+++ b/test/librestage.d/PKGBUILD-hello
@@ -0,0 +1,19 @@
+pkgname='libretools-hello'
+pkgver=1.0
+license=('GPL')
+url='https://parabolagnulinux.org'
+
+pkgrel=1
+arch=(any)
+depends=(sh)
+
+build() {
+ cd "$srcdir"
+ echo '#!/bin/sh' > hello.sh
+ echo 'echo Hello, world!' >> hello.sh
+}
+
+package() {
+ cd "$srcdir"
+ install -Dm755 hello.sh "$pkgdir"/usr/bin/libretools-hello
+}