apt-setup: simplify and move slim script

This commit is contained in:
Ark74 2025-08-27 14:28:23 -06:00
parent f9689bfb1c
commit c3aeccf573
2 changed files with 6 additions and 17 deletions

View file

@ -1,18 +1,7 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
file="$1"
ROOT="${ROOT:-/target}"
LEGACY="$ROOT/etc/apt/sources.list"
SD="$ROOT/etc/apt/sources.list.d"
SAVETO="$ROOT/etc/apt/sources.list.new"
LEGACY="/target/etc/apt/sources.list"
MSG="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources"
# If .sources exist, leave sources.list reduced only as a breadcrumb
if ls "$SD"/*.sources >/dev/null 2>&1; then
MSG="# Trisquel sources have moved to /etc/apt/sources.list.d/trisquel.sources"
: > "$SAVETO"
printf '%s\n' "$MSG" > "$file" # lo que verify appenderá
fi
exit 0
printf '%s\n' "$MSG" > "$LEGACY"