Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

set-local-devuan-repo.sh (Source)

#!/bin/sh
# Startdate: 2020-03-12
# Purpose: Replace original devuan repos with my local devuan mirror
# History:
#    2021-01-27 remove prebuilt file. Just use heredoc
#    2023-02-28 add new repo section non-free-firmware
# Documentation:
# Use the network file if available, otherwise, use this hardcoded heredoc.
tf=/etc/apt/sources.list
touch "${tf}"
{
   cat <<'EOF'
# file: /mnt/public/Support/Platforms/devuan/sources.list
# date: 2023-02-28
# the 3 main ones: ascii main/security/updates
# uncomment all of them when needing winehq-staging for AoC.
# If using ascii, there are multiple lines: ascii ascii-security ascii-updates
#deb http://deb.devuan.org/merged ceres main contrib non-free non-free-firmware
deb http://www.example.com/mirror/devuan ceres main contrib non-free non-free-firmware
deb-src http://pkgmaster.devuan.org/merged ceres main
EOF
} > "${tf}"