#!/bin/sh
set -e

SOURCE_LIST=/etc/apt/sources.list

cp -v $SOURCE_LIST $SOURCE_LIST.debsave

cat > $SOURCE_LIST.new <<EOF
# Pardus Yirmibir
deb http://depo.pardus.org.tr/pardus yirmibir main contrib non-free
# deb-src http://depo.pardus.org.tr/pardus yirmibir main contrib non-free

deb http://depo.pardus.org.tr/guvenlik yirmibir main contrib non-free
# deb-src http://depo.pardus.org.tr/guvenlik yirmibir main contrib non-free
EOF

mv -fv $SOURCE_LIST.new $SOURCE_LIST

DEBIAN_FRONTEND=noninteractive apt update
DEBIAN_FRONTEND=noninteractive apt -yq -o Dpkg::Options::="--force-confnew" full-upgrade

exit 0
