forked from ungleich-public/cdist
allow empty file
This commit is contained in:
parent
fcd730f905
commit
d7fdc8006f
1 changed files with 1 additions and 7 deletions
|
@ -8,14 +8,8 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$file" ]
|
if [ -f "$file" ]
|
||||||
then
|
|
||||||
if [ -s "$file" ]
|
|
||||||
then
|
then
|
||||||
cat "$file"
|
cat "$file"
|
||||||
else
|
|
||||||
echo "$file is empty" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "$file do not exist" >&2
|
echo "$file do not exist" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue