Skip to content

Commit e6e551c

Browse files
authored
Update 15_pkg_upgrade.sh
1 parent 273ebf7 commit e6e551c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts.d/15_pkg_upgrade.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ while true; do
2727
echo "Upgradeable packages:"
2828
printf '%s\n' "${upgradeable_packages[@]}"
2929

30-
first_package="${upgradeable_packages[0]}"
31-
if [[ -z "$first_package" || "$first_package" == *WARNING* || "$first_package" == "Listing" ]]; then
30+
last_package="${upgradeable_packages[-1]}"
31+
if [[ -z "$last_package" || "$last_package" == *WARNING* || "$last_package" == "Listing" ]]; then
3232
echo "Invalid package name detected, skipping..."
3333
continue
3434
fi
3535

36-
echo "Upgrading first package: $first_package"
37-
_op _chroot apt install -y "$first_package" || die "Failed to upgrade $first_package"
36+
echo "Upgrading last package: $last_package"
37+
_op _chroot apt install -y "$last_package" || die "Failed to upgrade $last_package"
3838
done
3939

4040
echo "Releasing held packages..."

0 commit comments

Comments
 (0)