diff --git a/src/script/arch-update.sh b/src/script/arch-update.sh index 62cfdb5..bce0dfd 100755 --- a/src/script/arch-update.sh +++ b/src/script/arch-update.sh @@ -77,8 +77,8 @@ if grep -Eq '^[[:space:]]*PrivilegeElevationCommand[[:space:]]*=[[:space:]]*(sud su_cmd=$(grep -E '^[[:space:]]*PrivilegeElevationCommand[[:space:]]*=[[:space:]]*(sudo|doas|run0)[[:space:]]*$' "${config_file}" 2> /dev/null | awk -F '=' '{print $2}' | tr -d '[:space:]') fi -if grep -Eq '^[[:space:]]*DiffProg[[:space:]]*=[[:space:]].*[[:space:]]*$' "${config_file}" 2> /dev/null; then - diff_prog=$(grep -E '^[[:space:]]*DiffProg[[:space:]]*=[[:space:]].*[[:space:]]*$' "${config_file}" 2> /dev/null | awk -F '=' '{print $2}' | tr -d '[:space:]') +if grep -Eq '^[[:space:]]*DiffProg[[:space:]]*=[[:space:]]*[^[:space:]].*[[:space:]]*$' "${config_file}" 2> /dev/null; then + diff_prog=$(grep -E '^[[:space:]]*DiffProg[[:space:]]*=[[:space:]]*[^[:space:]].*[[:space:]]*$' "${config_file}" 2> /dev/null | awk -F '=' '{print $2}' | tr -d '[:space:]') fi # Definition of the colors for the colorized output