Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rmens committed Aug 10, 2024
1 parent d583d74 commit 1c11df6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ FUNCTIONS_LIB_URL="https://raw.githubusercontent.com/oszuidwest/bash-functions/m

# General Raspberry Pi configuration (might be used later but we're not using this so keep the linter happy)
#CONFIG_FILE_PATHS=("/boot/firmware/config.txt" "/boot/config.txt")
CMDLINE_FILE="/boot/firmware/cmdline.txt"
VIDEO_OPTION="video=HDMI-A-1:1920x1080@60D"
#FIRST_IP=$(hostname -I | awk '{print $1}')

# Remove old functions library and download the latest version
Expand Down Expand Up @@ -55,6 +57,16 @@ ask_user "DO_UPDATES" "y" "Do you want to perform all OS updates? (y/n)" "y/n"
# Timezone configuration
set_timezone Europe/Amsterdam

# Check if the resolution force is already present in the cmdline
if ! grep -q "$VIDEO_OPTION" "$CMDLINE_FILE"; then
echo "Option not found in $CMDLINE_FILE, appending..."
# Append the option to the end of the file
sudo sed -i "$ s/$/ $VIDEO_OPTION/" "$CMDLINE_FILE"
echo "Option appended successfully."
else
echo "Option already exists in $CMDLINE_FILE, no changes made."
fi

# Update OS
if [ "$DO_UPDATES" == "y" ]; then
update_os silent
Expand Down

0 comments on commit 1c11df6

Please sign in to comment.