Skip to content

Commit

Permalink
Final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pabera committed Jan 2, 2024
1 parent 2aa6f47 commit e18189b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions installation/components/setup_hifiberry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ "$(is_root)" = false ]; then
exit 1
fi

boot_config_path=get_boot_config_path
boot_config_path=$(get_boot_config_path)
if [ "$boot_config_path" = "unknown" ]; then
echo "ERROR: It seems you are not running Raspian OS."
exit 1
Expand All @@ -27,17 +27,14 @@ check_existing_hifiberry() {
existing_config=$(grep 'dtoverlay=hifiberry-' "$boot_config_path")
if [ ! -z "$existing_config" ]; then
echo "Existing HiFiBerry configuration detected: $existing_config"
read -p "Do you want to proceed with a new configuration? This will remove the existing one. (y/n): " yn
read -p "Do you want to proceed with a new configuration? This will remove the existing one. (Y/n): " yn
case $yn in
[Yy]* )
[yY][eE][sS]|[yY])
remove_existing_hifiberry;
return 0;;
[Nn]* )
*)
echo "Exiting without making changes.";
exit;;
* )
echo "Please answer yes or no.";
check_existing_hifiberry;;
esac
fi
}
Expand Down

0 comments on commit e18189b

Please sign in to comment.