Skip to content

Commit

Permalink
# Apply both video and boot options in one go
Browse files Browse the repository at this point in the history
  • Loading branch information
rmens committed Aug 25, 2024
1 parent 58d56d4 commit 0200438
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ ask_user "DO_UPDATES" "y" "Do you want to perform all OS updates? (y/n)" "y/n"
# Set system timezone
set_timezone Europe/Amsterdam

# Configure video resolution if not already set
echo -e "${BLUE}►► Setting video resolution...${NC}"
if ! grep -q "$VIDEO_OPTION" "$CMDLINE_FILE"; then
sudo sed -i "$ s/$/ $VIDEO_OPTION/" "$CMDLINE_FILE"
echo "Resolution set to $VIDEO_OPTION"
else
echo "Resolution $VIDEO_OPTION already exists in $CMDLINE_FILE, no changes made."
fi
# Apply cmdline.txt modifications
echo -e "${BLUE}►► Applying video and boot options...${NC}"
CMDLINE_OPTIONS="$VIDEO_OPTIONS $BOOT_OPTIONS"
for OPTION in $CMDLINE_OPTIONS; do
if ! grep -q "$OPTION" "$CMDLINE_FILE"; then
sudo sed -i "$ s/$/ $OPTION/" "$CMDLINE_FILE"
echo "Applied option: $OPTION"
else
echo "Option $OPTION already present in $CMDLINE_FILE, no changes made."
fi
done

# Perform OS updates if requested by the user
if [ "$DO_UPDATES" == "y" ]; then
Expand Down

0 comments on commit 0200438

Please sign in to comment.