commit: 0cc1560e6966fea8d66ef25e51cc04c9f100db03
Author: Scott Moser <smoser <AT> brickies <DOT> net>
AuthorDate: Mon Jan 26 21:56:18 2026 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 18 17:26:49 2026 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=0cc1560e
symtree.sh: add definition for missing function 'error'
Without the 'error' function, this script will not exit
failure on files that do not exist:
$ ./symtree.sh asdf
./symtree.sh: line 88: error: command not found
$ echo $?
0
The error function is copied from lddtree.sh
Signed-off-by: Scott Moser <smoser <AT> brickies.net>
Part-of: https://github.com/gentoo/pax-utils/pull/21
Closes: https://github.com/gentoo/pax-utils/pull/21
Signed-off-by: Sam James <sam <AT> gentoo.org>
symtree.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/symtree.sh b/symtree.sh
index b0a7d4d..9e3ae77 100755
--- a/symtree.sh
+++ b/symtree.sh
@@ -15,6 +15,12 @@ usage() {
exit ${1:-0}
}
+error() {
+ echo "${argv0}: $*" 1>&2
+ ret=1
+ return 1
+}
+
sym_list() {
# with large strings, bash is much slower than sed
local type=$1; shift