distribution/packages/jelos/sources/scripts/show_changelog

33 lines
564 B
Text
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present Fewtarius
. /etc/profile
CHANGELOG="/storage/.cache/changelog"
if [ ! -e "${CHANGELOG}" ]
then
exit 0
fi
WIDTH=$(fbwidth)
if [ "${WIDTH}" -le "480" ]
then
FONTSIZE=8
elif [ "${WIDTH}" -gt "480" ] && [ "${WIDTH}" -le "640" ]
then
FONTSIZE=12
elif [ "${WIDTH}" -gt "640" ] && [ "${WIDTH}" -le "720" ]
then
FONTSIZE=14
elif [ "${WIDTH}" -gt "720" ] && [ "${WIDTH}" -lt "1080" ]
then
FONTSIZE=20
else
FONTSIZE=24
fi
/usr/bin/text_viewer -f ${FONTSIZE} ${CHANGELOG}