aims-release-upgrade 1.02 KB
Newer Older
Jonathan Carter's avatar
Jonathan Carter committed
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

if [ "$1" != "-f" ];then
    echo "AIMS Desktop 2020.1 has not yet been released,"
    echo "add '-f' to continue upgrading anyway."
    exit 1
fi

# Set interface to noninteractive
export DEBIAN_FRONTEND="noninteractive"
Jonathan Carter's avatar
Jonathan Carter committed
11
#export DPKG_OPTIONS='-o Dpkg::Options::="--force-confold"'
Jonathan Carter's avatar
Jonathan Carter committed
12
13
14

echo "Updating sources..."
sed --in-place "s/stretch/buster/g" /etc/apt/sources.list
Jonathan Carter's avatar
Jonathan Carter committed
15
sed --in-place "s/stretch/buster/g" /etc/apt/sources.list.d/* 2> /dev/null
Jonathan Carter's avatar
Jonathan Carter committed
16
17
18
19

echo " * Updating package list..."
apt --quiet update
echo " * Downloading upgrade package set..."
Jonathan Carter's avatar
Jonathan Carter committed
20
apt-get $DPKG_OPTIONS --yes --quiet --download-only dist-upgrade
Jonathan Carter's avatar
Jonathan Carter committed
21
echo " * Performing initial upgrade (safe upgrade)..."
Jonathan Carter's avatar
Jonathan Carter committed
22
apt-get $DPKG_OPTIONS --yes --quiet upgrade
Jonathan Carter's avatar
Jonathan Carter committed
23
echo " * Completeing full upgrade (dist-upgrade)..."
Jonathan Carter's avatar
Jonathan Carter committed
24
apt-get $DPKG_OPTIONS --yes --quiet full-upgrade
Jonathan Carter's avatar
Jonathan Carter committed
25
echo " * Ensure AIMS Desktop metapacage is still installed..."
Jonathan Carter's avatar
Jonathan Carter committed
26
apt-get $DPKG_OPTIONS --yes --quiet install aims-desktop
Jonathan Carter's avatar
Jonathan Carter committed
27
echo " * Remove packages that are no longer needed... "
Jonathan Carter's avatar
Jonathan Carter committed
28
apt-get $DPKG_OPTIONS --yes --quiet autoremove