You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
411 B

#!/bin/sh
repo_script=/usr/share/install2/postinstall.d/99-online-repo.sh
[ -f "$repo_script" ] || exit 0
[ -n "$GLOBAL_REPO" ] || exit 0
MIRROR="${GLOBAL_REPO#*/}" # alt, heanet, kiev, yandex, ...
repo_source="/etc/apt/sources.list.d/$MIRROR.list"
if [ ! -s "$repo_source" ]; then
echo "Error: $repo_source is not exist" >&2
exit 1
fi
sed -i "s;repo_source=.*;repo_source=$repo_source;" "$repo_script"