2022-02-02 17:31:03 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-02-17 13:45:43 +01:00
|
|
|
# abort if the user is not root
|
2022-02-02 17:31:03 +01:00
|
|
|
if [[ $(id -u) != "0" ]]; then
|
2022-02-17 13:45:43 +01:00
|
|
|
echo "Usage: run dist-upgrade.sh as root" 1>&2
|
2022-02-02 17:31:03 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# fail on errors
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
# disable user interactions
|
|
|
|
export DEBIAN_FRONTEND="noninteractive"
|
|
|
|
export TMPDIR="/tmp"
|
|
|
|
|
|
|
|
apt-get -y update
|
|
|
|
apt-get -y dist-upgrade
|
|
|
|
apt-get -y autoremove
|