forked from sig_core/toolkit
Fix error when /tmp is empty; ls is not always a good way to pipe into cpio because cpio does not know how to deal with things like symlinks and empty directories very well so switched to find.
This commit is contained in:
parent
d58f252e70
commit
3c3e3d2096
@ -11,8 +11,10 @@ PASSER=/var/tmp/cpio/pass
|
||||
r_log "cpio" "Test basic copy out"
|
||||
mkdir -p "$OUTTER" "$INNER" "$PASSER"
|
||||
|
||||
# Ensure at least one file exists in /tmp to prevent errors.
|
||||
echo 1 > $(mktemp)
|
||||
# shellcheck disable=2012
|
||||
ls /tmp | cpio -o > "$OUTTER"/cpio.out
|
||||
find /tmp -type f | cpio -o > "$OUTTER"/cpio.out 2> /dev/null
|
||||
r_checkExitStatus $?
|
||||
|
||||
r_log "cpio" "Test basic copy in"
|
||||
|
Loading…
Reference in New Issue
Block a user