Skip to content

Commit

Permalink
fix: Fix the parsing of DiffProg option
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 committed Jul 8, 2024
1 parent ff2116a commit 41393d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/script/arch-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41393d1

Please sign in to comment.