mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-08-02 04:46:05 -04:00
sanity test
This commit is contained in:
parent
0e661bc688
commit
82d401a7de
1 changed files with 21 additions and 0 deletions
|
@ -87,7 +87,28 @@ output_stat(){
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$stat_output" = "" ]; then
|
||||||
|
log error "stat_output is empty.
|
||||||
|
File name: '${file_name}'
|
||||||
|
Stat output: '${stat_output}'
|
||||||
|
stat_output_newlined: '${stat_output_newlined}'
|
||||||
|
line: '${line}'
|
||||||
|
" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
stat_output_newlined="$(printf '%s\n' "${stat_output//${delimiter}/$'\n'}")"
|
stat_output_newlined="$(printf '%s\n' "${stat_output//${delimiter}/$'\n'}")"
|
||||||
|
|
||||||
|
if test "${stat_output_newlined}" = ""; then
|
||||||
|
log error "stat_output_newlined is empty.
|
||||||
|
File name: '${file_name}'
|
||||||
|
Stat output: '${stat_output}'
|
||||||
|
stat_output_newlined: '${stat_output_newlined}'
|
||||||
|
line: '${line}'
|
||||||
|
" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
readarray -t arr <<< "${stat_output_newlined}"
|
readarray -t arr <<< "${stat_output_newlined}"
|
||||||
|
|
||||||
if test "${#arr[@]}" = 0; then
|
if test "${#arr[@]}" = 0; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue