Fix linting issues in scripts
This commit is contained in:
parent
e3d5f15c00
commit
c4952aad8f
7 changed files with 17 additions and 13 deletions
|
|
@ -5,17 +5,17 @@ WATCHLIST=~/.local/share/package-alert/watchlist
|
|||
agg_results=""
|
||||
|
||||
if [ -f "${WATCHLIST}" ]; then
|
||||
for pattern in $(cat "${WATCHLIST}"); do
|
||||
while read -r pattern; do
|
||||
pat_results=$(apt-cache search --names-only "${pattern}")
|
||||
if [ ! -z "${pat_results}" ]; then
|
||||
if [ -n "${pat_results}" ]; then
|
||||
agg_results="${agg_results:+${agg_results}
|
||||
}Packages matching \"${pattern}\":
|
||||
${pat_results}
|
||||
"
|
||||
fi
|
||||
done
|
||||
done < "${WATCHLIST}"
|
||||
fi
|
||||
|
||||
if [ ! -z "${agg_results}" ]; then
|
||||
if [ -n "${agg_results}" ]; then
|
||||
printf '%s' "${agg_results}" | /usr/sbin/sendmail "${USER}"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue