Modify script to use only built-in sh functions

main
Marie-Joseph 2 years ago
parent 0a26e7976c
commit 089ad90f2b
  1. 14
      check-overscan

@ -1,14 +1,22 @@
#!/bin/sh
configFile="/boot/firmware/config.txt";
found=;
if [ ! $(awk '/disable_overscan=1/ { print("1") }' $configFile) ]; then
echo "
while IFS= read -r line || [ -n "$line" ]; do
if [ "$line" = "disable_overscan=1" ]; then
found="1";
fi;
done < $configFile;
if [ ! $found ]; then
printf "
# Remove black borders
disable_overscan=1
# Overclocking
over_voltage=6
arm_freq=2147
gpu_freq=750" >> $configFile;
gpu_freq=750
" >> $configFile;
fi;