[arkdep] diff implement removed
This commit is contained in:
parent
a3de5259ed
commit
d94cf565ef
1 changed files with 16 additions and 0 deletions
16
arkdep
16
arkdep
|
@ -661,6 +661,15 @@ diff () {
|
|||
done
|
||||
done
|
||||
|
||||
# Find removed packages
|
||||
for old_pkg in "${old_pkgs[@]}"; do
|
||||
declare old_spaced=($old_pkg)
|
||||
|
||||
if [[ ! "${new_pkgs[@]}" =~ "${old_spaced[0]}" ]]; then
|
||||
removed+=("${old_spaced[0]}")
|
||||
fi
|
||||
done
|
||||
|
||||
# Print changed packages and diff
|
||||
if [[ $update_diff_style == 'list' ]]; then
|
||||
num=0
|
||||
|
@ -680,6 +689,13 @@ diff () {
|
|||
done
|
||||
fi
|
||||
|
||||
if [[ ${#removed[@]} -ne 0 ]]; then
|
||||
printf '\nRemoved:\n'
|
||||
for rem in "${removed[@]}"; do
|
||||
printf " $rem\n"
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue