Skip to content

Commit 0cc1560

Browse files
smoserthesamesam
authored andcommitted
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@brickies.net> Part-of: #21 Closes: #21 Signed-off-by: Sam James <sam@gentoo.org>
1 parent d279ca5 commit 0cc1560

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

symtree.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ usage() {
1515
exit ${1:-0}
1616
}
1717

18+
error() {
19+
echo "${argv0}: $*" 1>&2
20+
ret=1
21+
return 1
22+
}
23+
1824
sym_list() {
1925
# with large strings, bash is much slower than sed
2026
local type=$1; shift

0 commit comments

Comments
 (0)