Allow local modification acceptance prompt to be skipped when passing 'skip-prompt' as a parameter value to check_local_mods() function

This commit is contained in:
weslambert
2022-08-19 16:07:14 -04:00
committed by GitHub
parent 9a692288e2
commit f00d9074ff

View File

@@ -227,7 +227,7 @@ check_local_mods() {
echo "" echo ""
echo "To reference this list later, check $SOUP_LOG". echo "To reference this list later, check $SOUP_LOG".
echo echo
if [[ -z $UNATTENDED ]]; then if [[ -z $UNATTENDED ]] && ! [[ "${1}" == "skip-prompt" ]]; then
while true; do while true; do
read -p "Please review the local modifications shown above as they may cause problems during or after the update. read -p "Please review the local modifications shown above as they may cause problems during or after the update.
@@ -1405,7 +1405,7 @@ main() {
fi fi
echo "Checking for local modifications." echo "Checking for local modifications."
check_local_mods check_local_mods skip-prompt
echo "Checking sudoers file." echo "Checking sudoers file."
check_sudoers check_sudoers