PepMiniiso/pepscriptsdev/07update-system

29 lines
667 B
Plaintext
Raw Normal View History

2023-10-01 17:53:47 +00:00
#!/bin/sh -e
# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
# This script updates the system after Debian installation.
# Update the system
2024-03-01 12:58:13 -01:00
if ! chroot /target apt update; then
echo "Failed to update package lists. Aborting." >&2
exit 1
fi
# Upgrade the system
if ! chroot /target apt upgrade -y; then
echo "Failed to upgrade packages. Aborting." >&2
exit 1
fi
2023-10-01 17:53:47 +00:00
# Clean up unnecessary packages
2024-03-01 12:58:13 -01:00
if ! chroot /target apt autoremove -y; then
echo "Failed to remove unnecessary packages. Continuing anyway." >&2
fi
echo "System update completed successfully."
exit 0