potcasse: improve other OSes support

This commit is contained in:
Vincent Finance 2021-08-14 11:01:45 +02:00
parent f5a3671282
commit 0aae9a616b
1 changed files with 10 additions and 1 deletions

View File

@ -117,7 +117,16 @@ EOF
do
echo "Scanning $episode"
. ${episode}/metadata.sh
SIZE=$(stat -f "%z" "${episode}/${AUDIOFILE}")
UNAME=$(uname)
if
[ $UNAME = 'OpenBSD' ] ||
[ $UNAME = 'FreeBSD' ] ||
[ $UNAME = 'NetBSD' ]
then
SIZE=$(stat -f "%z" "${episode}/${AUDIOFILE}")
else
SIZE=$(stat --format="%s" "${episode}/${AUDIOFILE}")
fi
EXT=${AUDIOFILE##*.}
rsync -a "${episode}/${AUDIOFILE}" output_html/episodes/
cat <<EOF >> $TMPRSS