Automated Change by GitHub Actions

This commit is contained in:
okunze 2022-08-26 12:20:56 +00:00 committed by github-actions[bot]
parent 269dc6e8b2
commit 15f790ecf2
3 changed files with 20 additions and 7 deletions

View File

@ -18,14 +18,26 @@ argon_check_pkg() {
fi fi
} }
# Check if Raspbian, Ubuntu, others
CHECKPLATFORM="Others" CHECKPLATFORM="Others"
# Check if Raspbian, otherwise Ubuntu if [ -f "/etc/os-release" ]
grep -q -F 'Raspbian' /etc/os-release &> /dev/null then
if [ $? -eq 0 ] source /etc/os-release
if [ "$ID" = "raspbian" ]
then
CHECKPLATFORM="Raspbian"
elif [ "$ID" = "ubuntu" ]
then
CHECKPLATFORM="Ubuntu"
fi
fi
if [ "$CHECKPLATFORM" = "Raspbian" ]
then then
CHECKPLATFORM="Raspbian"
pkglist=(raspi-gpio python3-rpi.gpio python3-smbus i2c-tools) pkglist=(raspi-gpio python3-rpi.gpio python3-smbus i2c-tools)
else else
# Todo handle lgpio
# Ubuntu has serial and i2c enabled # Ubuntu has serial and i2c enabled
pkglist=(python3-rpi.gpio python3-smbus i2c-tools) pkglist=(python3-rpi.gpio python3-smbus i2c-tools)
fi fi
@ -155,7 +167,9 @@ echo ' curpair = curconfig.split("=")' >> $powerbuttonscript
echo ' tempcfg = float(curpair[0])' >> $powerbuttonscript echo ' tempcfg = float(curpair[0])' >> $powerbuttonscript
echo ' fancfg = int(float(curpair[1]))' >> $powerbuttonscript echo ' fancfg = int(float(curpair[1]))' >> $powerbuttonscript
echo ' if tempval >= tempcfg:' >> $powerbuttonscript echo ' if tempval >= tempcfg:' >> $powerbuttonscript
echo ' if fancfg < 25:' >> $powerbuttonscript echo ' if fancfg < 1:' >> $powerbuttonscript
echo ' return 0' >> $powerbuttonscript
echo ' elif fancfg < 25:' >> $powerbuttonscript
echo ' return 25' >> $powerbuttonscript echo ' return 25' >> $powerbuttonscript
echo ' return fancfg' >> $powerbuttonscript echo ' return fancfg' >> $powerbuttonscript
echo ' return 0' >> $powerbuttonscript echo ' return 0' >> $powerbuttonscript
@ -317,7 +331,6 @@ echo 'echo "Thank you."' >> $configscript
echo 'get_number () {' >> $configscript echo 'get_number () {' >> $configscript
echo ' read curnumber' >> $configscript echo ' read curnumber' >> $configscript
echo ' re="^[0-9]+$"' >> $configscript
echo ' if [ -z "$curnumber" ]' >> $configscript echo ' if [ -z "$curnumber" ]' >> $configscript
echo ' then' >> $configscript echo ' then' >> $configscript
echo ' echo "-2"' >> $configscript echo ' echo "-2"' >> $configscript

View File

@ -1 +0,0 @@
Files downloaded on: 2022-04-06

1
source/downloaded_on.txt Normal file
View File

@ -0,0 +1 @@
2022-08-26 12:20:55 UTC