mirror of https://gitlab.com/curben/blog
17 lines
311 B
Bash
17 lines
311 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
## Homepage should exists and non-empty
|
||
|
|
||
|
HOMEPAGE="public/microblog/index.html"
|
||
|
|
||
|
if [ ! -f "$HOMEPAGE" ]; then
|
||
|
echo "Error: homepage doesn't exist"
|
||
|
exit 1
|
||
|
else
|
||
|
FILE_SIZE=$(ls -s "$HOMEPAGE" | cut -d" " -f1)
|
||
|
if [ "$FILE_SIZE" = 0 ]; then
|
||
|
echo "Error: homepage is empty"
|
||
|
exit 1
|
||
|
fi
|
||
|
fi
|