#!/usr/bin/env bash

# Name=Install AuxiNux Ubuntu 26.04 Sources
# Desc=Configure les depots Ubuntu 26.04 via le miroir AuxiNux

set -Eeuo pipefail

if [[ "${EUID}" -ne 0 ]]; then
  echo "Lance avec root: curl -fsSL https://dep.auxinux.ca/scripts/install-auxinux-sources-UB.sh | sudo bash" >&2
  exit 1
fi

apt-get update
apt-get install -y ca-certificates curl ubuntu-keyring

curl -fsSL \
  "https://dep.auxinux.ca/scripts/auxinux-ubuntu26.sources" \
  -o /etc/apt/sources.list.d/auxinux-ubuntu26.sources

apt-get update

echo "Sources AuxiNux Ubuntu 26.04 installees:"
echo "/etc/apt/sources.list.d/auxinux-ubuntu26.sources"
